java.lang.Object
com.pervasive.datarush.cal.ClusterSpecifier
- All Implemented Interfaces:
Serializable
A "URL-like" entity that identifies a cluster. ClusterSpecifiers are keyed by
their
scheme(), which identifies the type of cluster. For the
DataRush cluster, the scheme is either "dr" for the distributed cluster or
"pseudodistributed" for the pseudo-distributed cluster. The general syntax of
a cluster specifier is "scheme://host:port?option1=value1&option2=value2".- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClusterSpecifierConstant for the pseudo-distributed cluster -
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterSpecifiercreate()Returns a cluster specifier with default settings.format()Formats this cluster specifier in a format that can be parsed usingparse(String).host()Returns the host of the specifierReturns a new specifier with the host set to the specified valuebooleanReturns whether this is the special pseudo-distributed cluser.multiOption(String name) Returns a multi-valued option of the given nameReturns the options of the specifierReturns the option of the given name.Returns a new specifier with the given option set to the specified valueReturns a new specifier with the given option set to the specified valueoptions()Returns the options of the specifier.Returns a new specifier with the options set to the specified valuestatic ClusterSpecifierParses the given cluster specifier string.intport()Returns the port of the specifier.port(int port) Returns a new specifier with the port set to the specified valuescheme()Returns the schema of the specifier.Returns a new specifier with the scheme set to the specified valuetoString()
-
Field Details
-
PSEUDO_DISTRIBUTED
Constant for the pseudo-distributed cluster
-
-
Method Details
-
isPseudoDistributed
public boolean isPseudoDistributed()Returns whether this is the special pseudo-distributed cluser.- Returns:
- whether this is the pseudo-distributed cluster.
-
scheme
Returns the schema of the specifier.- Returns:
- the schema of the specifier.
-
host
Returns the host of the specifier- Returns:
- the host of the specifier
-
port
public int port()Returns the port of the specifier.- Returns:
- the port of the specifier.
-
multiOptions
Returns the options of the specifier- Returns:
- the options of the specifier
-
options
Returns the options of the specifier. For multi-valued options, the values in the map will be equal to the first value of the option.- Returns:
- the options of the specifier
-
scheme
Returns a new specifier with the scheme set to the specified value- Parameters:
scheme- the new scheme- Returns:
- a new specifier
-
host
Returns a new specifier with the host set to the specified value- Parameters:
host- the new host- Returns:
- a new specifier
-
port
Returns a new specifier with the port set to the specified value- Parameters:
port- the new port- Returns:
- a new specifier
-
options
Returns a new specifier with the options set to the specified value- Parameters:
options- the new options- Returns:
- a new specifier
-
multiOption
Returns a multi-valued option of the given name- Parameters:
name- the name of the option- Returns:
- the value of the option. Returned value may be empty but will never be null.
-
option
Returns the option of the given name. In this event that is is a multi-valued option, will return the first value.- Parameters:
name- the name of the option- Returns:
- the value of the option
-
option
Returns a new specifier with the given option set to the specified value- Parameters:
name- the name of the optionvalue- the value of the option- Returns:
- a new specifier with the given option set to the specified value
-
option
Returns a new specifier with the given option set to the specified value- Parameters:
name- the name of the optionvalue- the value of the option- Returns:
- a new specifier with the given option set to the specified value
-
create
Returns a cluster specifier with default settings.- Returns:
- a cluster specifier with default settings
-
parse
Parses the given cluster specifier string. This expects a string of the form "scheme://host:port?option1=value1&option2=value2".- Parameters:
uristr- the string- Returns:
- a cluster specifier
- Throws:
URISyntaxException- if there was a parse error
-
format
Formats this cluster specifier in a format that can be parsed usingparse(String).- Returns:
- a formatted cluster specifier
-
toString
-