Package org.apache.kafka.common
Class Node
java.lang.Object
org.apache.kafka.common.Node
public class Node extends Object
Information about a Kafka node
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleanequals(Object obj)inthashCode()booleanhasRack()True if this node has a defined rackStringhost()The host name for this nodeintid()The node id of this nodeStringidString()String representation of the node id.booleanisEmpty()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 NodenoNode()intport()The port for this nodeStringrack()The rack for this nodeStringtoString()
-
Constructor Details
-
Node
-
Node
-
-
Method Details
-
noNode
-
isEmpty
public 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.- Returns:
- true if it is, false otherwise
-
id
public int id()The node id of this node -
idString
String representation of the node id. Typically the integer id is used to serialize over the wire, the string representation is used as an identifier with NetworkClient code -
host
The host name for this node -
port
public int port()The port for this node -
hasRack
public boolean hasRack()True if this node has a defined rack -
rack
The rack for this node -
hashCode
public int hashCode() -
equals
-
toString
-