public class Node extends Object
Modifier and Type | Field and Description |
---|---|
protected Integer |
hash |
protected String |
host |
protected int |
id |
protected String |
idString |
protected int |
port |
protected String |
rack |
Constructor and Description |
---|
Node(int id,
String host,
int port) |
Node(int id,
String host,
int port,
String rack) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
hasRack()
True if this node has a defined rack
|
String |
host()
The host name for this node
|
int |
id()
The node id of this node
|
String |
idString()
String representation of the node id.
|
boolean |
isEmpty()
Check whether this node is empty, which may be the case if noNode() is used as a placeholder
in a response payload with an error.
|
static Node |
noNode() |
int |
port()
The port for this node
|
String |
rack()
The rack for this node
|
String |
toString() |
protected final int id
protected final String idString
protected final String host
protected final int port
protected final String rack
protected Integer hash
public Node(int id, String host, int port)
public static Node noNode()
public boolean isEmpty()
public int id()
public String idString()
public String host()
public int port()
public boolean hasRack()
public String rack()