Class PeerFinder

java.lang.Object
org.elasticsearch.discovery.PeerFinder

public abstract class PeerFinder extends Object
  • Field Details

    • REQUEST_PEERS_ACTION_NAME

      public static final String REQUEST_PEERS_ACTION_NAME
      See Also:
      Constant Field Values
    • DISCOVERY_FIND_PEERS_INTERVAL_SETTING

      public static final Setting<org.elasticsearch.core.TimeValue> DISCOVERY_FIND_PEERS_INTERVAL_SETTING
    • DISCOVERY_REQUEST_PEERS_TIMEOUT_SETTING

      public static final Setting<org.elasticsearch.core.TimeValue> DISCOVERY_REQUEST_PEERS_TIMEOUT_SETTING
    • VERBOSITY_INCREASE_TIMEOUT_SETTING

      public static final Setting<org.elasticsearch.core.TimeValue> VERBOSITY_INCREASE_TIMEOUT_SETTING
  • Constructor Details

  • Method Details

    • activate

      public void activate(DiscoveryNodes lastAcceptedNodes)
    • deactivate

      public void deactivate(DiscoveryNode leader)
    • holdsLock

      protected final boolean holdsLock()
    • getLeader

      public Optional<DiscoveryNode> getLeader()
    • getCurrentTerm

      public long getCurrentTerm()
    • setCurrentTerm

      public void setCurrentTerm(long currentTerm)
    • onActiveMasterFound

      protected abstract void onActiveMasterFound(DiscoveryNode masterNode, long term)
      Invoked on receipt of a PeersResponse from a node that believes it's an active leader, which this node should therefore try and join. Note that invocations of this method are not synchronised. By the time it is called we may have been deactivated.
    • onFoundPeersUpdated

      protected abstract void onFoundPeersUpdated()
      Invoked when the set of found peers changes. Note that invocations of this method are not fully synchronised, so we only guarantee that the change to the set of found peers happens before this method is invoked. If there are multiple concurrent changes then there will be multiple concurrent invocations of this method, with no guarantee as to their order. For this reason we do not pass the updated set of peers as an argument to this method, leaving it to the implementation to call getFoundPeers() with appropriate synchronisation to avoid lost updates. Also, by the time this method is invoked we may have been deactivated.
    • getLastResolvedAddresses

      public List<TransportAddress> getLastResolvedAddresses()
    • getFoundPeers

      public Iterable<DiscoveryNode> getFoundPeers()
    • startProbe

      protected void startProbe(TransportAddress transportAddress)