Class PartitionInfo
java.lang.Object
org.apache.kafka.common.PartitionInfo
This is used to describe per-partition state in the MetadataResponse.
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()Node[]The subset of the replicas that are in sync, that is caught-up to the leader and ready to take over as leader if the leader should failleader()The node id of the node currently acting as a leader for this partition or null if there is no leaderNode[]The complete set of observers for this partition regardless of whether they are alive or up-to-datestatic PartitionInfoof(String topic, int partition, Node leader, Node[] replicas, Node[] observers, Node[] inSyncReplicas, Node[] offlineReplicas) Node[]The subset of the replicas that are offlineintThe partition idNode[]replicas()The complete set of replicas for this partition regardless of whether they are alive or up-to-datetopic()The topic nametoString()
Constructor Details
PartitionInfo
PartitionInfo
Method Details
of
@Confluentpublic static PartitionInfo of(String topic, int partition, Node leader, Node[] replicas, Node[] observers, Node[] inSyncReplicas, Node[] offlineReplicas) topic
The topic namepartition
public int partition()The partition idleader
The node id of the node currently acting as a leader for this partition or null if there is no leaderreplicas
The complete set of replicas for this partition regardless of whether they are alive or up-to-dateobservers
The complete set of observers for this partition regardless of whether they are alive or up-to-dateinSyncReplicas
The subset of the replicas that are in sync, that is caught-up to the leader and ready to take over as leader if the leader should failofflineReplicas
The subset of the replicas that are offlinehashCode
equals
toString