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 Details

    • VoteCollection

      public VoteCollection()
  • Method Details

    • 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:
      toString in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object