Package org.apache.kafka.common
Class Node
java.lang.Object
org.apache.kafka.common.Node
Information about a Kafka node
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleaninthashCode()booleanhasRack()True if this node has a defined rackhost()The host name for this nodeintid()The node id of this nodeidString()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 noderack()The rack for this nodetoString()
- 
Constructor Details- 
Node
- 
Node
 
- 
- 
Method Details- 
noNode
- 
isEmptypublic 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
 
- 
idpublic int id()The node id of this node
- 
idStringString 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
- 
hostThe host name for this node
- 
portpublic int port()The port for this node
- 
hasRackpublic boolean hasRack()True if this node has a defined rack
- 
rackThe rack for this node
- 
hashCodepublic int hashCode()
- 
equals
- 
toString
 
-