Class CoordinationState.VoteCollection
java.lang.Object
org.elasticsearch.cluster.coordination.CoordinationState.VoteCollection
- Enclosing class:
- CoordinationState
public static class CoordinationState.VoteCollection
extends java.lang.Object
A collection of votes, used to calculate quorums. Optionally records the Joins as well.
-
Constructor Summary
Constructors Constructor Description VoteCollection() -
Method Summary
Modifier and Type Method Description booleanaddJoinVote(Join join)booleanaddVote(DiscoveryNode sourceNode)booleancontainsVoteFor(DiscoveryNode node)booleanequals(java.lang.Object o)java.util.Set<Join>getJoins()inthashCode()booleanisEmpty()booleanisQuorum(CoordinationMetadata.VotingConfiguration configuration)java.util.Collection<DiscoveryNode>nodes()java.lang.StringtoString()
-
Constructor Details
-
VoteCollection
public VoteCollection()
-
-
Method Details
-
addVote
-
addJoinVote
-
isQuorum
-
containsVoteFor
-
isEmpty
public boolean isEmpty() -
nodes
-
getJoins
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-