Package io.vertx.kafka.client.common
Class Node
java.lang.Object
io.vertx.kafka.client.common.Node
Information about a Kafka cluster node
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHost()intgetId()intgetPort()booleanhasRack()booleanisEmpty()rack()setHasRack(boolean hasRack) Set if this node has a defined rackSet the host name for this nodesetId(int id) Set the node id of this nodesetIdString(String idString) Set the string representation of the node idsetIsEmpty(boolean isEmpty) Set if this node is emptysetPort(int port) Set the port for this nodeSet the rack for this nodetoJson()Convert object to JSON representationtoString()
-
Constructor Details
-
Node
public Node()Constructor -
Node
public Node(boolean hasRack, String host, int id, String idString, boolean isEmpty, int port, String rack) Constructor- Parameters:
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 node
-
Node
Constructor (from JSON representation)- Parameters:
json- JSON representation
-
-
Method Details
-
hasRack
public boolean hasRack()- Returns:
- true if this node has a defined rack
-
setHasRack
Set if this node has a defined rack- Parameters:
hasRack- if this node has a defined rack- Returns:
- current instance of the class to be fluent
-
getHost
- Returns:
- the host name for this node
-
setHost
Set the host name for this node- Parameters:
host- the host name for this node- Returns:
- current instance of the class to be fluent
-
getId
public int getId()- Returns:
- the node id of this node
-
setId
Set the node id of this node- Parameters:
id- the node id of this node- Returns:
- current instance of the class to be fluent
-
getIdString
- Returns:
- String representation of the node id
-
setIdString
Set the string representation of the node id- Parameters:
idString- String representation of the node id- Returns:
- current instance of the class to be fluent
-
isEmpty
public boolean isEmpty()- Returns:
- if this node is empty, which may be the case if noNode() is used as a placeholder in a response payload with an error
-
setIsEmpty
Set if this node is empty- Parameters:
isEmpty- if this node is empty- Returns:
- current instance of the class to be fluent
-
getPort
public int getPort()- Returns:
- the port for this node
-
setPort
Set the port for this node- Parameters:
port- the port for this node- Returns:
- current instance of the class to be fluent
-
rack
- Returns:
- the rack for this node
-
setRack
Set the rack for this node- Parameters:
rack- the rack for this node- Returns:
- current instance of the class to be fluent
-
toJson
Convert object to JSON representation- Returns:
- JSON representation
-
toString
-