NodeIDType
- public abstract class ConsistentNodeConfig<NodeIDType> extends java.lang.Object implements NodeConfig<NodeIDType>
Constructor and Description |
---|
ConsistentNodeConfig(NodeConfig<NodeIDType> nc) |
Modifier and Type | Method and Description |
---|---|
java.net.InetAddress |
getBindAddress(NodeIDType id) |
java.net.InetAddress |
getNodeAddress(NodeIDType id) |
java.util.Set<NodeIDType> |
getNodeIDs() |
int |
getNodePort(NodeIDType id) |
java.net.InetSocketAddress |
getNodeSocketAddress(NodeIDType id) |
java.util.Set<NodeIDType> |
getReplicatedServers(java.lang.String name) |
java.util.Set<NodeIDType> |
getValuesFromJSONArray(org.json.JSONArray array) |
java.util.Set<NodeIDType> |
getValuesFromStringSet(java.util.Set<java.lang.String> strNodes)
Converts a set of string node ids using valueOf.
|
boolean |
nodeExists(NodeIDType id) |
NodeIDType |
valueOf(java.lang.String strValue)
Converts a string representation of a node id into the appropriate node
id type.
|
public ConsistentNodeConfig(NodeConfig<NodeIDType> nc)
nc
- public java.util.Set<NodeIDType> getReplicatedServers(java.lang.String name)
name
- public boolean nodeExists(NodeIDType id)
nodeExists
in interface NodeConfig<NodeIDType>
public java.net.InetAddress getNodeAddress(NodeIDType id)
getNodeAddress
in interface NodeConfig<NodeIDType>
id
.public java.net.InetAddress getBindAddress(NodeIDType id)
getBindAddress
in interface NodeConfig<NodeIDType>
id
.public int getNodePort(NodeIDType id)
getNodePort
in interface NodeConfig<NodeIDType>
id
.public java.net.InetSocketAddress getNodeSocketAddress(NodeIDType id)
id
- id
.public java.util.Set<NodeIDType> getNodeIDs()
getNodeIDs
in interface NodeConfig<NodeIDType>
public NodeIDType valueOf(java.lang.String strValue)
Stringifiable
valueOf
in interface Stringifiable<NodeIDType>
public java.util.Set<NodeIDType> getValuesFromStringSet(java.util.Set<java.lang.String> strNodes)
Stringifiable
getValuesFromStringSet
in interface Stringifiable<NodeIDType>
public java.util.Set<NodeIDType> getValuesFromJSONArray(org.json.JSONArray array) throws org.json.JSONException
getValuesFromJSONArray
in interface Stringifiable<NodeIDType>
org.json.JSONException