Class UnicastZenPing

java.lang.Object
org.elasticsearch.discovery.zen.UnicastZenPing
All Implemented Interfaces:
Closeable, AutoCloseable, org.elasticsearch.core.Releasable, ZenPing

public class UnicastZenPing extends Object implements ZenPing
  • Field Details

  • Constructor Details

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.elasticsearch.core.Releasable
    • start

      public void start()
      Specified by:
      start in interface ZenPing
    • clearTemporalResponses

      public void clearTemporalResponses()
      Clears the list of cached ping responses.
    • ping

      public void ping(Consumer<ZenPing.PingCollection> resultsConsumer, org.elasticsearch.core.TimeValue duration)
      Sends three rounds of pings notifying the specified Consumer when pinging is complete. Pings are sent after resolving configured unicast hosts to their IP address (subject to DNS caching within the JVM). A batch of pings is sent, then another batch of pings is sent at half the specified TimeValue, and then another batch of pings is sent at the specified TimeValue. The pings that are sent carry a timeout of 1.25 times the specified TimeValue. When pinging each node, a connection and handshake is performed, with a connection timeout of the specified TimeValue.
      Specified by:
      ping in interface ZenPing
      Parameters:
      resultsConsumer - the callback when pinging is complete
      duration - the timeout for various components of the pings
    • ping

      protected void ping(Consumer<ZenPing.PingCollection> resultsConsumer, org.elasticsearch.core.TimeValue scheduleDuration, org.elasticsearch.core.TimeValue requestDuration)
      a variant of ping(Consumer, TimeValue), but allows separating the scheduling duration from the duration used for request level time outs. This is useful for testing
    • finishPingingRound

      protected void finishPingingRound(UnicastZenPing.PingingRound pingingRound)
    • sendPings

      protected void sendPings(org.elasticsearch.core.TimeValue timeout, UnicastZenPing.PingingRound pingingRound)
    • submitToExecutor

      protected void submitToExecutor(AbstractRunnable abstractRunnable)
    • getPingResponseHandler

    • getVersion

      protected Version getVersion()