Package com.j_spaces.core.client
Class SpaceURL
- All Implemented Interfaces:
SmartExternalizable,Externalizable,Serializable,Cloneable,Map<Object,Object>
- Direct Known Subclasses:
SpaceUrlCache
Deprecated.
Copyright (c) 2010 GigaSpaces Technologies Ltd. All rights reserved
The software source code is proprietary and confidential information of GigaSpaces. You may use
the software source code solely under the terms and limitations of The license agreement granted
to you by GigaSpaces.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.Represents*symbol.static final StringDeprecated.This system property can be used when space started usingServiceStarter.static final StringDeprecated.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 final StringDeprecated.jini://multicast support.static final StringDeprecated.The id attribute is used to distinguish between cache instances in this cluster.static final StringDeprecated.jini://multicast support.static final StringDeprecated.The cluster schema XSL file name to be used to setup a cluster config on the fly in memory.static final StringDeprecated.The total_members attribute in the space url stands for the total number of space members within the space cluster.static final StringDeprecated.Container key which holds the container name taken from the space url stringstatic final StringDeprecated.java:// protocol support.static final longDeprecated.The default timeout interval (in millis).static final StringDeprecated.Default schema name, will be used if schema is not defined.static final StringDeprecated.java:// protocol.static final StringDeprecated.static final StringDeprecated.jini://multicast support.static final StringDeprecated.RMI Registry host and port or Jini any host (*)static final StringDeprecated.If ignore validation is passed, it means the space url not need to be valid.static final StringDeprecated.Controls the interval (in millis) at which the finder polls for Spaces.static final StringDeprecated.jini:// protocol.static final StringDeprecated.Local cache storage type: LOCAL_CACHE_STORE_REFERENCE LOCAL_CACHE_STORE_SHALLOW_COPYstatic final StringDeprecated.Local cache will store a reference to the user's object.static final StringDeprecated.Local cache will store a shallow copy of the user's object.static final StringDeprecated.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 final StringDeprecated.jini://unicast support.static final StringDeprecated.The machine hostname where space is running instatic final StringDeprecated.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 final StringDeprecated.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 final StringDeprecated.When using properties, one can set the SpaceURL attributes which we break into properties with gs.space.url.arg.<attribute-name> where attribute name = cluster_schema | schema | total_members etc.static final StringDeprecated.When using properties, one can set the SpaceURL attributes line which we break into properties with gs.space.url.arg_line.static final StringDeprecated.Protocol namestatic final StringDeprecated.rmi:// protocol.static final StringDeprecated.Using the schema flag, the requested space schema name will be loaded/parsed while creating an embedded space.static final StringDeprecated.When setting this URL property a secured space will be created.static final StringDeprecated.iffalseSpaceFinder will not initialize Security Manager.static final StringDeprecated.Space namestatic final StringDeprecated.The state attribute is used to define specified space state.static final StringDeprecated.A STATE parameter value, means that the space state is started.static final StringDeprecated.A STATE parameter value, means that the space state is stopped.static final StringDeprecated.jini://multicast support.static final intDeprecated.static final intDeprecated.In the UPDATE_MODE_PUSH policy, the cache will be updated with the updated value.static final intDeprecated.In the UPDATE_MODE_PUSH policy, the updated value is simply marked as invalidated.static final StringDeprecated.Initializes local cache.static final StringDeprecated.iffalseOptimistic Locking is disabled.static final StringDeprecated.When setting this URL property a view will be created according to the query.Fields inherited from class java.util.Properties
defaults -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Deprecated.deep clones this SpaceURL instance - makes a distinct copy of each of the SpaceURL fields, and underlying tables.static StringconcatAttrIfNotExist(String url, String name, String value) Deprecated.Concatenates if not exist the specified attrName and attrValue to the end of thespaceURL.booleancontainsKey(Object key) Deprecated.booleanDeprecated.Deprecated.Gets the cluster schema name.Deprecated.Get container name.Deprecated.Returns custom propertiesgetHost()Deprecated.Gets URL host.String[]Deprecated.longDeprecated.Deprecated.longDeprecated.Deprecated.getProperty(String key) Deprecated.Deprecated.Returns SpaceFinder protocol.Deprecated.Gets the space and container schema name.Deprecated.Gets Space name.Deprecated.Gets a list of all the available space url attributes keys.getURL()Deprecated.Gets URL.inthashCode()Deprecated.static booleanisBooleanUrlAttribute(String name) Deprecated.booleanDeprecated.Returns true if the protocol is EMBEDDED_SPACE, false otherwise.booleanDeprecated.Returns true if the protocol is JINI, false otherwise.booleanDeprecated.Returns true if the protocol is remote (JINI or RMI), false otherwise.booleanDeprecated.Returns true if the protocol is RMI, false otherwise.static booleanisUrlAttribute(String name) Deprecated.static booleanisValidProtocol(String protocol) Deprecated.Deprecated.voidDeprecated.voidDeprecated.Deprecated.voidsetContainerName(String containerName) Deprecated.Sets container name in SpaceURL and in the ContainerName GenericEntryvoidsetCustomProperties(Properties customProperties) Deprecated.Set custom propertiesvoidsetElectionState(String electionState) Deprecated.Sets the active election state lookup attribute.voidsetLookupAttribute(String name, Entry attr) Deprecated.voidsetPropertiesForSpaceProxy(IJSpace spaceProxy) Deprecated.Set SpaceURL properties for desired space proxy.voidsetPropertiesPrefix(String protocolName, String hostAndPort, String containerName, String spaceName) Deprecated.Sets the space url "left"/prefix part of the url.setProperty(String key, String value) Deprecated.An overwrite method to set a SpaceURL property.voidsetSpaceName(String spaceName) Deprecated.Sets space name in SpaceURL and into the Name Entry which is later used in LookupFinder.toString()Deprecated.voidDeprecated.Methods inherited from class java.util.Properties
clear, compute, computeIfAbsent, computeIfPresent, contains, containsValue, elements, entrySet, forEach, get, getOrDefault, getProperty, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, putAll, putIfAbsent, rehash, remove, replace, replace, replaceAll, save, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.gigaspaces.serialization.SmartExternalizable
enabledSmartExternalizableWithReference
-
Field Details
-
ANY
Deprecated.Represents*symbol.- See Also:
-
JINI_PROTOCOL
Deprecated.jini:// protocol.- See Also:
-
RMI_PROTOCOL
Deprecated.rmi:// protocol.- See Also:
-
EMBEDDED_SPACE_PROTOCOL
Deprecated.java:// protocol.- See Also:
-
GROUPS
Deprecated.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- See Also:
-
LOCATORS
Deprecated.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). - See Also:
-
CLUSTER_NAME
Deprecated.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- See Also:
-
CLUSTER_GROUP
Deprecated.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- See Also:
-
TIMEOUT
Deprecated.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- See Also:
-
INTERVAL_TIMEOUT
Deprecated.Controls the interval (in millis) at which the finder polls for Spaces. Default toDEFAULT_INTERVAL_TIMEOUTwhich is100milliseconds.- See Also:
-
DEFAULT_INTERVAL_TIMEOUT
public static final long DEFAULT_INTERVAL_TIMEOUTDeprecated.The default timeout interval (in millis).- See Also:
-
FIFO_MODE
Deprecated.useFifoSupportinstead.if
trueFIFO mode enabled. Example: jini://localhost:10098/containerName/JavaSpaces?fifo Default: false- See Also:
-
CREATE
Deprecated.java:// protocol support. if
truea 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 iffalseno 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- See Also:
-
USE_LOCAL_CACHE
Deprecated.Initializes local cache. Example: jini://localhost:10098/containerName/JavaSpaces?useLocalCache Default: not initialized
- See Also:
-
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.
- See Also:
-
UPDATE_MODE_NONE
public static final int UPDATE_MODE_NONEDeprecated.- See Also:
-
UPDATE_MODE_PULL
public static final int UPDATE_MODE_PULLDeprecated.In the UPDATE_MODE_PUSH policy, the cache will be updated with the updated value.
- See Also:
-
UPDATE_MODE_PUSH
public static final int UPDATE_MODE_PUSHDeprecated.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.
- See Also:
-
LOCAL_CACHE_STORAGE_TYPE
Deprecated.Local cache storage type: LOCAL_CACHE_STORE_REFERENCE LOCAL_CACHE_STORE_SHALLOW_COPY
- See Also:
-
LOCAL_CACHE_STORE_REFERENCE
Deprecated.Local cache will store a reference to the user's object.
- See Also:
-
LOCAL_CACHE_STORE_SHALLOW_COPY
Deprecated.Local cache will store a shallow copy of the user's object.
- See Also:
-
VERSIONED
Deprecated.if
falseOptimistic Locking is disabled. Example: jini://localhost:10098/containerName/JavaSpaces?versioned Default: false- See Also:
-
SECURITY_MANAGER
Deprecated.if
falseSpaceFinder will not initialize Security Manager. Example: jini://localhost:10098/containerName/JavaSpaces?securityManager Default: true- See Also:
-
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. Example: /./JavaSpace?cluster_schema=sync_replicated&mirror Default: no mirror connection
- See Also:
-
VIEWS
Deprecated.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
SQLQueryrules. 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- See Also:
-
SECURED
Deprecated.When setting this URL property a secured space will be created. This property is implicit when providing user details.
- See Also:
-
SCHEMA_NAME
Deprecated.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)
- See Also:
-
DEFAULT_SCHEMA_NAME
Deprecated.Default schema name, will be used if schema is not defined.- See Also:
-
CLUSTER_SCHEMA
Deprecated.The cluster schema XSL file name to be used to setup a cluster config on the fly in memory. If the ?cluster_schema option is passed e.g. ?cluster_schema=sync_replication the system will use the sync_replication-cluster-schema.xsl together with a cluster Dom which will be built using user's inputs on regards # of members, # of backup members etc.- See Also:
-
CLUSTER_TOTAL_MEMBERS
Deprecated.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- See Also:
-
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. If this attribute is not defined the instance will be considered a primary space 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.- See Also:
-
CLUSTER_MEMBER_ID
Deprecated.The id attribute is used to distinguish between cache instances in this cluster.- See Also:
-
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. Another benefit of using the ?properties option is when we want to load system properties while VM starts or set SpaceURL attributes. See /config/gs.properties file as a reference.- See Also:
-
CACHE_URL_PROP
Deprecated.This system property can be used when space started usingServiceStarter.- See Also:
-
PROPERTIES_SPACE_URL_ARG
Deprecated.When using properties, one can set the SpaceURL attributes which we break into properties with gs.space.url.arg.<attribute-name> where attribute name = cluster_schema | schema | total_members etc. The space url args should be in a lower case.- See Also:
-
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. The value will be a lower cased url e.g. gs.space.url.arg_line=schema=persistent&id=2&total_members=3&cluster_schema=sync-replicated- See Also:
-
IGNORE_VALIDATION
Deprecated.If ignore validation is passed, it means the space url not need to be valid. The class SpaceUrlValidation will ignore and wouldn't check the Url. The default is false : to check the url validation- See Also:
-
CONTAINER
Deprecated.Container key which holds the container name taken from the space url string
- See Also:
-
STATE
Deprecated.The state attribute is used to define specified space state. Example: jini://
*/*/*?clustername=cluster&clustergroup=group&state=started- See Also:
-
STATE_STARTED
Deprecated.A STATE parameter value, means that the space state is started.
- See Also:
-
STATE_STOPPED
Deprecated.A STATE parameter value, means that the space state is stopped.
- See Also:
-
SPACE
Deprecated.Space name
- See Also:
-
HOST_NAME
Deprecated.RMI Registry host and port or Jini any host (*)
- See Also:
-
MACHINE_HOSTNAME
Deprecated.The machine hostname where space is running in
- See Also:
-
PROTOCOL_NAME
Deprecated.Protocol name
- See Also:
-
-
Constructor Details
-
SpaceURL
public SpaceURL()Deprecated.constructor.
-
-
Method Details
-
getSpaceUrlAttributes
Deprecated.Gets a list of all the available space url attributes keys.- Returns:
- List of all the available space url attributes keys in lower case E.g. create, schema, cluster_schema. NoWriteLease, fifo etc.
-
isUrlAttribute
Deprecated. -
isBooleanUrlAttribute
Deprecated. -
toString
Deprecated.- Overrides:
toStringin classProperties
-
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
clone
Deprecated.deep clones this SpaceURL instance - makes a distinct copy of each of the SpaceURL fields, and underlying tables. Basically overridesProperties.clone()method, which creates only a shallow copy.- Overrides:
clonein classProperties- Returns:
- a distinct copy of this SpaceURL (including all object references).
- See Also:
-
containsKey
Deprecated.- Specified by:
containsKeyin interfaceMap<Object,Object> - Overrides:
containsKeyin classProperties
-
put
Deprecated. -
getProperty
Deprecated.- Overrides:
getPropertyin classProperties
-
setProperty
Deprecated.An overwrite method to set a SpaceURL property. This method adds to the super functionality and intended to be the only method needs to be used to set SpaceURL properties (do not use SpaceURL.concatAttrIfNotExist()). - It updates the space url string with the passed key and appends it to the url string in case such does not exist. - If the passed key is one of the generic lookup attributes, used for services lookup, it will update its values as well. - It is also a chaining method which means you can call it several times and the set properties will be appended and set appropriately into the current SpaceURL object.- Overrides:
setPropertyin classProperties
-
remove
Deprecated. -
getURL
Deprecated.Gets URL.- Returns:
- entire SpaceFinder URL
-
getProtocol
Deprecated.Returns SpaceFinder protocol.- Returns:
- SpaceFinder protocol.
-
isJiniProtocol
public boolean isJiniProtocol()Deprecated.Returns true if the protocol is JINI, false otherwise.- Since:
- 9.0.1
-
isRmiProtocol
public boolean isRmiProtocol()Deprecated.Returns true if the protocol is RMI, false otherwise.- Since:
- 9.0.1
-
isEmbeddedProtocol
public boolean isEmbeddedProtocol()Deprecated.Returns true if the protocol is EMBEDDED_SPACE, false otherwise.- Since:
- 9.0.1
-
isRemoteProtocol
public boolean isRemoteProtocol()Deprecated.Returns true if the protocol is remote (JINI or RMI), false otherwise.- Since:
- 9.0.1
-
getMemberName
Deprecated.- Returns:
- the member name - containerName:spaceName
-
getHost
Deprecated.Gets URL host.- Returns:
- URL host, or
*if hostname is not defined
-
getContainerName
Deprecated.Get container name.- Returns:
- container name, or
*if container name is not defined
-
setContainerName
Deprecated.Sets container name in SpaceURL and in the ContainerName GenericEntry- Parameters:
containerName- The name of the container.
-
getSpaceName
Deprecated.Gets Space name.- Returns:
- Space name
-
setSpaceName
Deprecated.Sets space name in SpaceURL and into the Name Entry which is later used in LookupFinder.- Parameters:
spaceName- The name of the space.
-
setPropertiesPrefix
public void setPropertiesPrefix(String protocolName, String hostAndPort, String containerName, String spaceName) Deprecated.Sets the space url "left"/prefix part of the url. In other words, it enables you to set all besides the url attributes, which are right side of the ? separator (is such exists). The method is used with an existing SpaceURL instance and with conjunction with thesetProperty(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);- Parameters:
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://
-
refreshUrlString
public void refreshUrlString()Deprecated. -
setElectionState
Deprecated.Sets the active election state lookup attribute.- Parameters:
electionState- String representation of an election state.- See Also:
-
setLookupAttribute
Deprecated. -
getClusterSchema
Deprecated.Gets the cluster schema name.- Returns:
- Cluster Schema name
-
getSchema
Deprecated.Gets the space and container schema name.- Returns:
- Space and container schema name
-
setPropertiesForSpaceProxy
Deprecated.Set SpaceURL properties for desired space proxy.- Parameters:
spaceProxy- Space proxy.
-
concatAttrIfNotExist
Deprecated.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- Parameters:
url- The space URL.name- The attribute name.value- The attribute value (can be null, in case no value is required).- Returns:
- The new concatenated SpaceFinder URL.
-
isValidProtocol
Deprecated. -
getLookupIntervalTimeout
public long getLookupIntervalTimeout()Deprecated. -
getLookupTimeout
public long getLookupTimeout()Deprecated. -
getLookupGroups
Deprecated. -
getLookupLocators
Deprecated. -
getCustomProperties
Deprecated.Returns custom properties- Returns:
- custom properties
-
setCustomProperties
Deprecated.Set custom properties- Parameters:
customProperties- customProperties
-
writeExternal
Deprecated.- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
Deprecated.- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
FifoSupportinstead.