public class AliveBrokersSnapshot extends Object
Modifier and Type | Field and Description |
---|---|
static AliveBrokersSnapshot |
EMPTY_SNAPSHOT |
Constructor and Description |
---|
AliveBrokersSnapshot(Map<Integer,Long> liveBrokerIdsAndEpochs,
Set<Integer> brokerReplicaExclusions,
Set<Integer> demotedBrokers) |
Modifier and Type | Method and Description |
---|---|
Set<Integer> |
demotedBrokers()
Returns the demoted brokers in the cluster.
|
Optional<Long> |
epochFor(int brokerId)
Returns the broker epoch for the broker with ID
brokerId . |
boolean |
equals(Object o) |
int |
hashCode() |
Set<Integer> |
replicaExclusions()
Returns the active broker replica placement exclusions in the cluster
|
String |
toString() |
public static final AliveBrokersSnapshot EMPTY_SNAPSHOT
public AliveBrokersSnapshot(Map<Integer,Long> liveBrokerIdsAndEpochs, Set<Integer> brokerReplicaExclusions, Set<Integer> demotedBrokers)
liveBrokerIdsAndEpochs
- - a map, consisting of live broker ids as the key and their latest broker epoch as the valuebrokerReplicaExclusions
- - a set of broker ids where each broker present is excluded for replica placement