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 boolean
addJoinVote(Join join)
boolean
addVote(DiscoveryNode sourceNode)
boolean
containsVoteFor(DiscoveryNode node)
boolean
equals(java.lang.Object o)
java.util.Set<Join>
getJoins()
int
hashCode()
boolean
isEmpty()
boolean
isQuorum(CoordinationMetaData.VotingConfiguration configuration)
java.util.Collection<DiscoveryNode>
nodes()
java.lang.String
toString()
-
Constructor Details
-
VoteCollection
public VoteCollection()
-
-
Method Details
-
addVote
-
addJoinVote
-
isQuorum
-
containsVoteFor
-
isEmpty
public boolean isEmpty() -
nodes
-
getJoins
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-