public class TopicPartitionInfo
extends java.lang.Object
| Constructor | Description |
|---|---|
TopicPartitionInfo(int partition,
Node leader,
java.util.List<Node> replicas,
java.util.List<Node> isr) |
Create an instance of this class with the provided parameters.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object o) |
|
int |
hashCode() |
|
java.util.List<Node> |
isr() |
Return the in-sync replicas of the partition.
|
Node |
leader() |
Return the leader of the partition or null if there is none.
|
int |
partition() |
Return the partition id.
|
java.util.List<Node> |
replicas() |
Return the replicas of the partition in the same order as the replica assignment.
|
java.lang.String |
toString() |
public TopicPartitionInfo(int partition,
Node leader,
java.util.List<Node> replicas,
java.util.List<Node> isr)
partition - the partition idleader - the leader of the partition or Node.noNode() if there is none.replicas - the replicas of the partition in the same order as the replica assignment (the preferred replica
is the head of the list)isr - the in-sync replicaspublic int partition()
public Node leader()
public java.util.List<Node> replicas()
public java.util.List<Node> isr()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object