public class Node extends Object
Constructor and Description |
---|
Node()
Constructor
|
Node(boolean hasRack,
String host,
int id,
String idString,
boolean isEmpty,
int port,
String rack)
Constructor
|
Node(JsonObject json)
Constructor (from JSON representation)
|
Modifier and Type | Method and Description |
---|---|
String |
getHost() |
int |
getId() |
String |
getIdString() |
int |
getPort() |
boolean |
hasRack() |
boolean |
isEmpty() |
String |
rack() |
Node |
setHasRack(boolean hasRack)
Set if this node has a defined rack
|
Node |
setHost(String host)
Set the host name for this node
|
Node |
setId(int id)
Set the node id of this node
|
Node |
setIdString(String idString)
Set the string representation of the node id
|
Node |
setIsEmpty(boolean isEmpty)
Set if this node is empty
|
Node |
setPort(int port)
Set the port for this node
|
Node |
setRack(String rack)
Set the rack for this node
|
JsonObject |
toJson()
Convert object to JSON representation
|
String |
toString() |
public Node()
public Node(boolean hasRack, String host, int id, String idString, boolean isEmpty, int port, String rack)
hasRack
- true if this node has a defined rackhost
- the host name for this nodeid
- the node id of this nodeidString
- String representation of the node idisEmpty
- if this node is empty, which may be the case if noNode() is used as a placeholder in a response payload with an errorport
- the port for this noderack
- the rack for this nodepublic Node(JsonObject json)
json
- JSON representationpublic boolean hasRack()
public Node setHasRack(boolean hasRack)
hasRack
- if this node has a defined rackpublic String getHost()
public Node setHost(String host)
host
- the host name for this nodepublic int getId()
public Node setId(int id)
id
- the node id of this nodepublic String getIdString()
public Node setIdString(String idString)
idString
- String representation of the node idpublic boolean isEmpty()
public Node setIsEmpty(boolean isEmpty)
isEmpty
- if this node is emptypublic int getPort()
public Node setPort(int port)
port
- the port for this nodepublic String rack()
public Node setRack(String rack)
rack
- the rack for this nodepublic JsonObject toJson()
Copyright © 2021 Eclipse. All rights reserved.