public class CandidateBroker extends Object implements Comparable<CandidateBroker>
Constructor and Description |
---|
CandidateBroker(Broker broker,
Resource resource,
SortedSet<Replica> replicas,
boolean isAscending,
Set<Integer> excludedBrokersForLeadership,
Set<Integer> excludedBrokersForReplicaMove) |
Modifier and Type | Method and Description |
---|---|
Broker |
broker() |
int |
compareTo(CandidateBroker o) |
boolean |
equals(Object o) |
int |
hashCode() |
SortedSet<Replica> |
replicas() |
Resource |
resource() |
boolean |
shouldExcludeForLeadership(Replica replicaToReceive)
Check whether moving the given replica violates the leadership exclusion requirement
|
boolean |
shouldExcludeForReplicaMove(Replica replicaToReceive)
Check whether moving the given replica violates the replica move exclusion requirement
|
String |
toString() |
public Broker broker()
public Resource resource()
public boolean shouldExcludeForLeadership(Replica replicaToReceive)
replicaToReceive
- Candidate replica to move to this broker.public boolean shouldExcludeForReplicaMove(Replica replicaToReceive)
replicaToReceive
- Candidate replica to move to this broker.public int compareTo(CandidateBroker o)
compareTo
in interface Comparable<CandidateBroker>