@Deprecated public class SpaceURL extends Properties implements Externalizable
Modifier and Type | Field and Description |
---|---|
static String |
ANY
Deprecated.
Represents
* symbol. |
static String |
CACHE_URL_PROP
Deprecated.
This system property can be used when space started using
ServiceStarter . |
static String |
CLUSTER_BACKUP_ID
Deprecated.
Used in case of Partitioned Cache (when adding backup to each partition) The backup_id is
used to define whether the instance is a backup instance or not.
|
static String |
CLUSTER_GROUP
Deprecated.
jini:// multicast support. |
static String |
CLUSTER_MEMBER_ID
Deprecated.
The id attribute is used to distinguish between cache instances in this cluster.
|
static String |
CLUSTER_NAME
Deprecated.
jini:// multicast support. |
static String |
CLUSTER_SCHEMA
Deprecated.
The cluster schema XSL file name to be used to setup a cluster config on the fly in memory.
|
static String |
CLUSTER_TOTAL_MEMBERS
Deprecated.
The total_members attribute in the space url stands for
the total number of space members within the space cluster.
|
static String |
CONTAINER
Deprecated.
Container key which holds the container name taken from the space url string
|
static String |
CREATE
Deprecated.
java:// protocol support.
|
static long |
DEFAULT_INTERVAL_TIMEOUT
Deprecated.
The default timeout interval (in millis).
|
static String |
DEFAULT_SCHEMA_NAME
Deprecated.
Default schema name, will be used if schema is not defined.
|
static String |
EMBEDDED_SPACE_PROTOCOL
Deprecated.
java:// protocol.
|
static String |
FIFO_MODE
Deprecated.
use
FifoSupport instead. |
static String |
GROUPS
Deprecated.
jini:// multicast support. |
static String |
HOST_NAME
Deprecated.
RMI Registry host and port or Jini any host (*)
|
static String |
IGNORE_VALIDATION
Deprecated.
If ignore validation is passed, it means the space url not need to be valid.
|
static String |
INTERVAL_TIMEOUT
Deprecated.
Controls the interval (in millis) at which the finder polls for Spaces.
|
static String |
JINI_PROTOCOL
Deprecated.
jini:// protocol.
|
static String |
LOCAL_CACHE_STORAGE_TYPE
Deprecated.
Local cache storage type:
LOCAL_CACHE_STORE_REFERENCE
LOCAL_CACHE_STORE_SHALLOW_COPY
|
static String |
LOCAL_CACHE_STORE_REFERENCE
Deprecated.
Local cache will store a reference to the user's object.
|
static String |
LOCAL_CACHE_STORE_SHALLOW_COPY
Deprecated.
Local cache will store a shallow copy of the user's object.
|
static String |
LOCAL_CACHE_UPDATE_MODE
Deprecated.
DCache update modes:
UPDATE_MODE_PULL = 1
UPDATE_MODE_PUSH = 2
Example: jini://localhost:10098/containerName/JavaSpaces?useLocalCache&updateMode=1
Default: UPDATE_MODE_PULL.
|
static String |
LOCATORS
Deprecated.
jini:// unicast support. |
static String |
MACHINE_HOSTNAME
Deprecated.
The machine hostname where space is running in
|
static String |
MIRROR
Deprecated.
When setting this URL property it will allow the space to connect to the Mirror
service to push its data and operations for asynchronous persistency.
|
static String |
PROPERTIES_FILE_NAME
Deprecated.
If properties file name is passed, it means loading the schema and then loading the requested
[prop-file-name].properties file which contains the values to override the schema
space/container/cluster configuration values that are defined in the schema files.
|
static String |
PROPERTIES_SPACE_URL_ARG
Deprecated.
When using properties, one can set the SpaceURL attributes which we break into properties
with gs.space.url.arg.
|
static String |
PROPERTIES_SPACE_URL_ARGLINE
Deprecated.
When using properties, one can set the SpaceURL attributes line which we break into
properties with gs.space.url.arg_line.
|
static String |
PROTOCOL_NAME
Deprecated.
Protocol name
|
static String |
RMI_PROTOCOL
Deprecated.
rmi:// protocol.
|
static String |
SCHEMA_NAME
Deprecated.
Using the schema flag, the requested space schema name will be loaded/parsed
while creating an embedded space.
|
static String |
SECURED
Deprecated.
When setting this URL property a secured space will be created.
|
static String |
SECURITY_MANAGER
Deprecated.
if
false SpaceFinder will not initialize Security Manager. |
static String |
SPACE
Deprecated.
Space name
|
static String |
STATE
Deprecated.
The state attribute is used to define specified space state.
|
static String |
STATE_STARTED
Deprecated.
A STATE parameter value,
means that the space state is started.
|
static String |
STATE_STOPPED
Deprecated.
A STATE parameter value,
means that the space state is stopped.
|
static String |
TIMEOUT
Deprecated.
jini:// multicast support. |
static int |
UPDATE_MODE_NONE
Deprecated.
|
static int |
UPDATE_MODE_PULL
Deprecated.
In the UPDATE_MODE_PUSH policy,
the cache will be updated with the updated value.
|
static int |
UPDATE_MODE_PUSH
Deprecated.
In the UPDATE_MODE_PUSH policy, the updated value is simply marked as invalidated.
|
static String |
USE_LOCAL_CACHE
Deprecated.
Initializes local cache.
|
static String |
VERSIONED
Deprecated.
if
false Optimistic Locking is disabled. |
static String |
VIEWS
Deprecated.
When setting this URL property a view will be created according to the query.
|
defaults
Constructor and Description |
---|
SpaceURL()
Deprecated.
constructor.
|
Modifier and Type | Method and Description |
---|---|
SpaceURL |
clone()
Deprecated.
deep clones this SpaceURL instance - makes a distinct copy of each of the SpaceURL fields,
and underlying tables.
|
static String |
concatAttrIfNotExist(String url,
String name,
String value)
Deprecated.
Concatenates if not exist the specified attrName and attrValue to the end of the
spaceURL . |
boolean |
containsKey(Object key)
Deprecated.
|
boolean |
equals(Object obj)
Deprecated.
|
String |
getClusterSchema()
Deprecated.
Gets the cluster schema name.
|
String |
getContainerName()
Deprecated.
Get container name.
|
Properties |
getCustomProperties()
Deprecated.
Returns custom properties
|
String |
getHost()
Deprecated.
Gets URL host.
|
String[] |
getLookupGroups()
Deprecated.
|
long |
getLookupIntervalTimeout()
Deprecated.
|
LookupLocator[] |
getLookupLocators()
Deprecated.
|
long |
getLookupTimeout()
Deprecated.
|
String |
getMemberName()
Deprecated.
|
String |
getProperty(String key)
Deprecated.
|
String |
getProtocol()
Deprecated.
Returns SpaceFinder protocol.
|
String |
getSchema()
Deprecated.
Gets the space and container schema name.
|
String |
getSpaceName()
Deprecated.
Gets Space name.
|
static Set<String> |
getSpaceUrlAttributes()
Deprecated.
Gets a list of all the available space url attributes keys.
|
String |
getURL()
Deprecated.
Gets URL.
|
int |
hashCode()
Deprecated.
|
static boolean |
isBooleanUrlAttribute(String name)
Deprecated.
|
boolean |
isEmbeddedProtocol()
Deprecated.
Returns true if the protocol is EMBEDDED_SPACE, false otherwise.
|
boolean |
isJiniProtocol()
Deprecated.
Returns true if the protocol is JINI, false otherwise.
|
boolean |
isRemoteProtocol()
Deprecated.
Returns true if the protocol is remote (JINI or RMI), false otherwise.
|
boolean |
isRmiProtocol()
Deprecated.
Returns true if the protocol is RMI, false otherwise.
|
static boolean |
isUrlAttribute(String name)
Deprecated.
|
static boolean |
isValidProtocol(String protocol)
Deprecated.
|
Object |
put(Object key,
Object value)
Deprecated.
|
void |
readExternal(ObjectInput in)
Deprecated.
|
void |
refreshUrlString()
Deprecated.
|
Object |
remove(Object key)
Deprecated.
|
void |
setContainerName(String containerName)
Deprecated.
Sets container name in SpaceURL and in the ContainerName GenericEntry
|
void |
setCustomProperties(Properties customProperties)
Deprecated.
Set custom properties
|
void |
setElectionState(String electionState)
Deprecated.
Sets the active election state lookup attribute.
|
void |
setLookupAttribute(String name,
Entry attr)
Deprecated.
|
void |
setPropertiesForSpaceProxy(IJSpace spaceProxy)
Deprecated.
Set SpaceURL properties for desired space proxy.
|
void |
setPropertiesPrefix(String protocolName,
String hostAndPort,
String containerName,
String spaceName)
Deprecated.
Sets the space url "left"/prefix part of the url.
|
SpaceURL |
setProperty(String key,
String value)
Deprecated.
An overwrite method to set a SpaceURL property.
|
void |
setSpaceName(String spaceName)
Deprecated.
Sets space name in SpaceURL and into the Name Entry which is later used in LookupFinder.
|
String |
toString()
Deprecated.
|
void |
writeExternal(ObjectOutput out)
Deprecated.
|
getProperty, list, list, load, load, loadFromXML, propertyNames, save, store, store, storeToXML, storeToXML, stringPropertyNames
clear, compute, computeIfAbsent, computeIfPresent, contains, containsValue, elements, entrySet, forEach, get, getOrDefault, isEmpty, keys, keySet, merge, putAll, putIfAbsent, rehash, remove, replace, replace, replaceAll, size, values
public static final String ANY
*
symbol.public static final String JINI_PROTOCOL
public static final String RMI_PROTOCOL
public static final String EMBEDDED_SPACE_PROTOCOL
public static final String GROUPS
jini://
multicast support. LookupService group to find Container or Space using multicast jini:// protocol. This attribute will be ignored in unicast protocol jini://lookuphost/containerName/JavaSpaces, Example: jini://*
/containerName/?groups=fenix,pantera jini://*
/containerName/spaceName?groups=grid Default: public
public static final String LOCATORS
jini://
unicast support. The comma delimited Jini Locators list. This list will be used in the LookupLocators unicast registration for the container/space. When creating a space using SpaceFinder: SpaceFinder.find("/./Space?groups=g1,g2,g3&locators=h1:port,h2:port,h3:port). The locators property value will override thecontainer schema value. When client discovers a space: The locators URL property should be used to perform unicast LUS discovery. To enable both multicast and unicast discovery the following Space URL should be used. SpaceFinder.find("jini:////Space?groups=g1,g2,g3&locators=h1:port,h2:port,h3:port).
public static final String CLUSTER_NAME
jini://
multicast support. LookupService attribute to find Space using multicast jini:// protocol in specified cluster. This attribute will be ignored in unicast protocol jini://lookuphost/containerName/JavaSpaces, Example: jini://*
/containerName/JavaSpaces?clustername=myClusterTest Find JavaSpaces inmyClusterTest
, doesn't matter which container name. jini://*
/*
/JavaSpaces?clustername=myClusterTest Find any space inmyClusterTest
, doesn't matter which container name and space name. jini://*
/*
/*
?clustername=myClusterTest Default: null
public static final String CLUSTER_GROUP
jini://
multicast support. Clustered group to find Container or Space using multicast jini:// protocol. This attribute will be ignored in unicast protocol jini://lookuphost/containerName/JavaSpaces, Example: jini://*
/containerName/?clustergroup=fenix,pantera jini://*
/containerName/JavaSpaces?clustergroup=test Default: null
public static final String TIMEOUT
jini://
multicast support. The maximum timeout in ms to find Container or Space using multicast jini:// protocol. This attribute will be ignored in unicast protocol jini://lookuphost/containerName/JavaSpaces, Example: jini://*
/containerName/?timeout=5000 jini://*
/containerName/JavaSpaces?timeout=10000 Default: 5000 ms
public static final String INTERVAL_TIMEOUT
DEFAULT_INTERVAL_TIMEOUT
which is 100
milliseconds.public static final long DEFAULT_INTERVAL_TIMEOUT
INTERVAL_TIMEOUT
,
Constant Field Values@Deprecated public static final String FIFO_MODE
FifoSupport
instead.
if true
FIFO mode enabled.
Example: jini://localhost:10098/containerName/JavaSpaces?fifo
Default: false
public static final String CREATE
java:// protocol support. iftrue
a new Space will be created, if requested space already exists in container create operation will be ignored. Example: java://localhost:10098/containerName/JavaSpaces?create Note that when using the ?create option with java:// protocol, the system will create a container, space and use the default space configuration schema file (default-schema.xml) same as using for example: Example: java://localhost:10098/containerName/JavaSpaces?create?schema=default iffalse
no new space will be created. The system will return the space proxy which has same container name. In this case we do NOT match on the SpaceURL objects equals. Default: false
public static final String USE_LOCAL_CACHE
Initializes local cache. Example: jini://localhost:10098/containerName/JavaSpaces?useLocalCache Default: not initialized
public static final String LOCAL_CACHE_UPDATE_MODE
DCache update modes: UPDATE_MODE_PULL = 1 UPDATE_MODE_PUSH = 2 Example: jini://localhost:10098/containerName/JavaSpaces?useLocalCache&updateMode=1 Default: UPDATE_MODE_PULL.
public static final int UPDATE_MODE_NONE
LocalCacheContainer
,
Constant Field Valuespublic static final int UPDATE_MODE_PULL
In the UPDATE_MODE_PUSH policy, the cache will be updated with the updated value.
LocalCacheContainer
,
Constant Field Valuespublic static final int UPDATE_MODE_PUSH
In the UPDATE_MODE_PUSH policy, the updated value is simply marked as invalidated. Any attempt to retrieve an object from the cache, will enforce a reload of the updated value from the master cache.
LocalCacheContainer
,
Constant Field Valuespublic static final String LOCAL_CACHE_STORAGE_TYPE
Local cache storage type: LOCAL_CACHE_STORE_REFERENCE LOCAL_CACHE_STORE_SHALLOW_COPY
public static final String LOCAL_CACHE_STORE_REFERENCE
Local cache will store a reference to the user's object.
public static final String LOCAL_CACHE_STORE_SHALLOW_COPY
Local cache will store a shallow copy of the user's object.
public static final String VERSIONED
if false
Optimistic Locking is disabled.
Example: jini://localhost:10098/containerName/JavaSpaces?versioned
Default: false
public static final String SECURITY_MANAGER
if false
SpaceFinder will not initialize Security Manager.
Example: jini://localhost:10098/containerName/JavaSpaces?securityManager
Default: true
public static final String MIRROR
When setting this URL property it will allow the space to connect to the Mirror service to push its data and operations for asynchronous persistency. Example: /./JavaSpace?cluster_schema=sync_replicated&mirror Default: no mirror connection
public static final String VIEWS
When setting this URL property a view will be created according to the query.
The views value can include a list of queries separated by ";".
Query structure: Class-Name:SQL-Where-clause
The SQL-Where-clause should keep the View
rules.
Notice: views are only supported in conjuction with useLocalCache.
Example: /./JavaSpace?useLocalCache&views={MyEntry:fieldA=3;UserEntry:fieldB=3 AND fieldC=2}
Default: no views
View
,
Constant Field Valuespublic static final String SECURED
When setting this URL property a secured space will be created. This property is implicit when providing user details.
public static final String SCHEMA_NAME
Using the schema flag, the requested space schema name will be loaded/parsed while creating an embedded space. If the space already has configuration file then the requested schema will not be applied and the that file exist, it will overwrite the default configuration defined by the schema. Note that when using the option ?create with java:// protocol, the system will create a container, space and use the default space configuration schema file (default-schema.xml)
public static final String DEFAULT_SCHEMA_NAME
SCHEMA_NAME
,
Constant Field Valuespublic static final String CLUSTER_SCHEMA
public static final String CLUSTER_TOTAL_MEMBERS
The total_members attribute in the space url stands for the total number of space members within the space cluster. The number is used to create the list of members participating in the cluster on the fly based on the space name convention. This pattern is used to avoid the need for creating a cluster topology file. The number of actual running space instances can vary dynamically between 1<=total_members. Example: SpaceFinder.find(/./mySpace?cluster_schema=partitioned&total_members=4&id=1); In case it is used in Partitioned Space (when adding backup to each partition). In partitioned space each instance contains different segment of the total information. That information may be lost once a space is brought down or fails. To ensure the high availability of each partition a backup instance is set per partition. Setting up a partitioned space with backup instances will be done using the following command: For Member1: SpaceFinder.find(/./mySpace?cluster_schema=partitioned&total_members=4,2&id=1); For Member 1 backup 1: SpaceFinder.find(/./mySpace?cluster_schema=partitioned&total_members=4,2&id=2&backup_id=1); For Member 2 backup 2: SpaceFinder.find(/./mySpace?cluster_schema=partitioned&total_members=4,2&id=2&backup_id=2); The format of the total_members={number of primary instances, number of backup instances per primary} In this example the value is 4,2 which means that this cluster contains up to 4 primary instances each containing 2 backup instances. The backup_id is used to define whether the instance is a backup instance or not. If this attribute is not defined the instance will be considered a primary instance. The container name will be translated in this case to [space name]_container[id]_[backup_id]. In this case it will be expanded to mySpace_container1_1
public static final String CLUSTER_BACKUP_ID
public static final String CLUSTER_MEMBER_ID
public static final String PROPERTIES_FILE_NAME
public static final String CACHE_URL_PROP
ServiceStarter
.public static final String PROPERTIES_SPACE_URL_ARG
public static final String PROPERTIES_SPACE_URL_ARGLINE
public static final String IGNORE_VALIDATION
public static final String CONTAINER
Container key which holds the container name taken from the space url string
public static final String STATE
The state attribute is used to define specified space state. Example: jini://*
/*
/*
?clustername=cluster&clustergroup=group&state=started
,
Constant Field Valuespublic static final String STATE_STARTED
A STATE parameter value, means that the space state is started.
ISpaceState
,
Constant Field Valuespublic static final String STATE_STOPPED
A STATE parameter value, means that the space state is stopped.
ISpaceState
,
Constant Field Valuespublic static final String SPACE
Space name
public static final String HOST_NAME
RMI Registry host and port or Jini any host (*)
public static final String MACHINE_HOSTNAME
The machine hostname where space is running in
public static final String PROTOCOL_NAME
Protocol name
public static Set<String> getSpaceUrlAttributes()
public static boolean isUrlAttribute(String name)
public static boolean isBooleanUrlAttribute(String name)
public boolean equals(Object obj)
public int hashCode()
public SpaceURL clone()
Hashtable.clone()
method, which creates
only a shallow copy.clone
in class Hashtable<Object,Object>
IOUtils.deepClone(Object)
public boolean containsKey(Object key)
containsKey
in interface Map<Object,Object>
containsKey
in class Hashtable<Object,Object>
public String getProperty(String key)
getProperty
in class Properties
public SpaceURL setProperty(String key, String value)
setProperty
in class Properties
public String getURL()
public String getProtocol()
public boolean isJiniProtocol()
public boolean isRmiProtocol()
public boolean isEmbeddedProtocol()
public boolean isRemoteProtocol()
public String getMemberName()
public String getHost()
*
if hostname is not definedpublic String getContainerName()
*
if container name is not definedpublic void setContainerName(String containerName)
containerName
- The name of the container.public String getSpaceName()
public void setSpaceName(String spaceName)
spaceName
- The name of the space.public void setPropertiesPrefix(String protocolName, String hostAndPort, String containerName, String spaceName)
setProperty(String, String)
method.
Possible usage:
If the spaceURL begins with jini://localhist/mySpace_container/mySpace?schema=cache&timeout=3000
and we want just to replace the properties prefix and keep the rest i.e.
jini://*
/*
/*
?schema=cache&timeout=3000
Then you need to call: spaceURL.setPropertiesPrefix(SpaceURL.JINI_PROTOCOL, SpaceURL.ANY,
SpaceURL.ANY, SpaceURL.ANY);protocolName
- - if unknown protocol then will use Jini as a fallbackhostAndPort
- - host:port, might be *
if Jini://containerName
- - might be *
if Jini://spaceName
- - might be *
if Jini://public void refreshUrlString()
public void setElectionState(String electionState)
electionState
- String representation of an election state.ActiveElectionState
public String getClusterSchema()
public String getSchema()
public void setPropertiesForSpaceProxy(IJSpace spaceProxy)
spaceProxy
- Space proxy.public static String concatAttrIfNotExist(String url, String name, String value)
Concatenates if not exist the specified attrName and attrValue to the end of the
spaceURL
.
For i.e: SpaceURL.concatAttrIfNotExist( "jini://localhost/myCont/mySpace", timeout, 10000)
The return value is: jini://localhost/myCont/mySpace?timeout=10000
url
- The space URL.name
- The attribute name.value
- The attribute value (can be null, in case no value is required).public static boolean isValidProtocol(String protocol)
public long getLookupIntervalTimeout()
public long getLookupTimeout()
public String[] getLookupGroups()
public LookupLocator[] getLookupLocators()
public Properties getCustomProperties()
public void setCustomProperties(Properties customProperties)
customProperties
- customPropertiespublic void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
Copyright © GigaSpaces.