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.
-
-
Constructor Summary
Constructors Constructor Description VoteCollection()
-
Method Summary
Modifier and Type Method Description boolean
addVote(DiscoveryNode sourceNode)
boolean
containsVoteFor(DiscoveryNode node)
boolean
equals(java.lang.Object o)
int
hashCode()
boolean
isEmpty()
boolean
isQuorum(CoordinationMetaData.VotingConfiguration configuration)
java.util.Collection<DiscoveryNode>
nodes()
java.lang.String
toString()
-
-
-
Method Detail
-
addVote
public boolean addVote(DiscoveryNode sourceNode)
-
isQuorum
public boolean isQuorum(CoordinationMetaData.VotingConfiguration configuration)
-
containsVoteFor
public boolean containsVoteFor(DiscoveryNode node)
-
isEmpty
public boolean isEmpty()
-
nodes
public java.util.Collection<DiscoveryNode> nodes()
-
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
-
-