public final class ClusterSpecifier extends Object implements Serializable
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".Modifier and Type | Field and Description |
---|---|
static ClusterSpecifier |
PSEUDO_DISTRIBUTED
Constant for the pseudo-distributed cluster
|
Modifier and Type | Method and Description |
---|---|
static ClusterSpecifier |
create()
Returns a cluster specifier with default settings.
|
String |
format()
Formats this cluster specifier in a format that can be parsed using
parse(String) . |
String |
host()
Returns the host of the specifier
|
ClusterSpecifier |
host(String host)
Returns a new specifier with the host set to the specified value
|
boolean |
isPseudoDistributed()
Returns whether this is the special pseudo-distributed cluser.
|
List<String> |
multiOption(String name)
Returns a multi-valued option of the given name
|
Map<String,List<String>> |
multiOptions()
Returns the options of the specifier
|
String |
option(String name)
Returns the option of the given name.
|
ClusterSpecifier |
option(String name,
List<String> value)
Returns a new specifier with the given option set to the specified value
|
ClusterSpecifier |
option(String name,
String value)
Returns a new specifier with the given option set to the specified value
|
Map<String,String> |
options()
Returns the options of the specifier.
|
ClusterSpecifier |
options(Map<String,List<String>> options)
Returns a new specifier with the options set to the specified value
|
static ClusterSpecifier |
parse(String uristr)
Parses the given cluster specifier string.
|
int |
port()
Returns the port of the specifier.
|
ClusterSpecifier |
port(int port)
Returns a new specifier with the port set to the specified value
|
String |
scheme()
Returns the schema of the specifier.
|
ClusterSpecifier |
scheme(String scheme)
Returns a new specifier with the scheme set to the specified value
|
String |
toString() |
public static final ClusterSpecifier PSEUDO_DISTRIBUTED
public boolean isPseudoDistributed()
public String scheme()
public String host()
public int port()
public Map<String,List<String>> multiOptions()
public Map<String,String> options()
public ClusterSpecifier scheme(String scheme)
scheme
- the new schemepublic ClusterSpecifier host(String host)
host
- the new hostpublic ClusterSpecifier port(int port)
port
- the new portpublic ClusterSpecifier options(Map<String,List<String>> options)
options
- the new optionspublic List<String> multiOption(String name)
name
- the name of the optionpublic String option(String name)
name
- the name of the optionpublic ClusterSpecifier option(String name, String value)
name
- the name of the optionvalue
- the value of the optionpublic ClusterSpecifier option(String name, List<String> value)
name
- the name of the optionvalue
- the value of the optionpublic static ClusterSpecifier create()
public static ClusterSpecifier parse(String uristr) throws URISyntaxException
uristr
- the stringURISyntaxException
- if there was a parse errorpublic String format()
parse(String)
.Copyright © 2021 Actian Corporation. All rights reserved.