Class ElectionStrategy

java.lang.Object
org.elasticsearch.cluster.coordination.ElectionStrategy

public abstract class ElectionStrategy extends Object
  • Field Details

  • Constructor Details

    • ElectionStrategy

      protected ElectionStrategy()
  • Method Details

    • isElectionQuorum

      public final boolean isElectionQuorum(DiscoveryNode localNode, long localCurrentTerm, long localAcceptedTerm, long localAcceptedVersion, CoordinationMetadata.VotingConfiguration lastCommittedConfiguration, CoordinationMetadata.VotingConfiguration lastAcceptedConfiguration, CoordinationState.VoteCollection joinVotes)
      Whether there is an election quorum from the point of view of the given local node under the provided voting configurations
    • satisfiesAdditionalQuorumConstraints

      protected abstract boolean satisfiesAdditionalQuorumConstraints(DiscoveryNode localNode, long localCurrentTerm, long localAcceptedTerm, long localAcceptedVersion, CoordinationMetadata.VotingConfiguration lastCommittedConfiguration, CoordinationMetadata.VotingConfiguration lastAcceptedConfiguration, CoordinationState.VoteCollection joinVotes)
      The extension point to be overridden by plugins. Defines additional constraints on the election quorum.
      Parameters:
      localNode - the local node for the election quorum
      localCurrentTerm - the current term of the local node
      localAcceptedTerm - the last accepted term of the local node
      localAcceptedVersion - the last accepted version of the local node
      lastCommittedConfiguration - the last committed configuration for the election quorum
      lastAcceptedConfiguration - the last accepted configuration for the election quorum
      joinVotes - the votes that were provided so far
      Returns:
      true iff the additional quorum constraints are satisfied