Class CoordinationState.VoteCollection
- java.lang.Object
-
- org.elasticsearch.cluster.coordination.CoordinationState.VoteCollection
-
- Enclosing class:
- CoordinationState
public static class CoordinationState.VoteCollection extends java.lang.ObjectA 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()
-
-
-
Method Detail
-
addVote
public boolean addVote(DiscoveryNode sourceNode)
-
addJoinVote
public boolean addJoinVote(Join join)
-
isQuorum
public boolean isQuorum(CoordinationMetaData.VotingConfiguration configuration)
-
containsVoteFor
public boolean containsVoteFor(DiscoveryNode node)
-
isEmpty
public boolean isEmpty()
-
nodes
public java.util.Collection<DiscoveryNode> nodes()
-
getJoins
public java.util.Set<Join> 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
-
-