Class ElectMasterService.MasterCandidate

org.elasticsearch.discovery.zen.ElectMasterService.MasterCandidate
Enclosing class:
ElectMasterService

public static class ElectMasterService.MasterCandidate extends
a class to encapsulate all the information about a candidate in a master election that is needed to decided which of the candidates should win
  • Field Details

    • UNRECOVERED_CLUSTER_VERSION

      public static final long UNRECOVERED_CLUSTER_VERSION
      See Also:
      Constant Field Values
  • Constructor Details

    • MasterCandidate

      public MasterCandidate(DiscoveryNode node, long clusterStateVersion)
  • Method Details

    • getNode

      public DiscoveryNode getNode()
    • getClusterStateVersion

      public long getClusterStateVersion()
    • toString

      public  toString()
      Overrides:
       in class 
    • compare

      compares two candidates to indicate which the a better master. A higher cluster state version is better
      Returns:
      -1 if c1 is a batter candidate, 1 if c2.