public class TopicPartitionInfo extends Object
| Constructor and Description | 
|---|
| TopicPartitionInfo()Constructor | 
| TopicPartitionInfo(JsonObject json)Constructor (from JSON representation) | 
| TopicPartitionInfo(List<Node> isr,
                  Node leader,
                  int partition,
                  List<Node> replicas)Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| List<Node> | getIsr() | 
| Node | getLeader() | 
| int | getPartition() | 
| List<Node> | getReplicas() | 
| TopicPartitionInfo | setIsr(List<Node> isr)Set the subset of the replicas that are in sync | 
| TopicPartitionInfo | setLeader(Node leader)Set the node id of the node currently acting as a leader | 
| TopicPartitionInfo | setPartition(int partition)Set the partition id | 
| TopicPartitionInfo | setReplicas(List<Node> replicas)Set the complete set of replicas for this partition | 
| JsonObject | toJson()Convert object to JSON representation | 
| String | toString() | 
public TopicPartitionInfo()
public TopicPartitionInfo(List<Node> isr, Node leader, int partition, List<Node> replicas)
isr - the subset of the replicas that are in syncleader - the node id of the node currently acting as a leaderpartition - the partition idreplicas - the complete set of replicas for this partitionpublic TopicPartitionInfo(JsonObject json)
json - JSON representationpublic List<Node> getIsr()
public TopicPartitionInfo setIsr(List<Node> isr)
isr - the subset of the replicas that are in syncpublic Node getLeader()
public TopicPartitionInfo setLeader(Node leader)
leader - the node id of the node currently acting as a leaderpublic int getPartition()
public TopicPartitionInfo setPartition(int partition)
partition - the partition idpublic List<Node> getReplicas()
public TopicPartitionInfo setReplicas(List<Node> replicas)
replicas - the complete set of replicas for this partitionpublic JsonObject toJson()
Copyright © 2021 Eclipse. All rights reserved.