Class Node
java.lang.Object
org.apache.kafka.common.Node
Information about a Kafka node
Constructor Summary
ConstructorsMethod Summary
Modifier 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.booleanisFenced()Returns whether this node is fenced.static NodenoNode()intport()The port for this noderack()The rack for this nodetoString()
Constructor Details
Node
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 nodeidString
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 codehost
The host name for this nodeport
public int port()The port for this nodehasRack
public boolean hasRack()True if this node has a defined rackrack
The rack for this nodeisFenced
public boolean isFenced()Returns whether this node is fenced.This applies to broker nodes only. For controller quorum nodes, this field is not relevant and is defined to be
false.hashCode
equals
toString