org.elasticsearch.discovery.zen.ping.unicast
Class UnicastZenPing

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.common.component.AbstractLifecycleComponent<ZenPing>
          extended by org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing
All Implemented Interfaces:
CloseableComponent, LifecycleComponent<ZenPing>, ZenPing

public class UnicastZenPing
extends AbstractLifecycleComponent<ZenPing>
implements ZenPing


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.discovery.zen.ping.ZenPing
ZenPing.PingListener, ZenPing.PingResponse
 
Field Summary
static int LIMIT_PORTS_COUNT
           
 
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
UnicastZenPing(Settings settings, ThreadPool threadPool, TransportService transportService, ClusterName clusterName, Set<UnicastHostsProvider> unicastHostsProviders)
           
UnicastZenPing(ThreadPool threadPool, TransportService transportService, ClusterName clusterName)
           
 
Method Summary
 void addHostsProvider(UnicastHostsProvider provider)
           
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 void ping(ZenPing.PingListener listener, TimeValue timeout)
           
 ZenPing.PingResponse[] pingAndWait(TimeValue timeout)
           
 void removeHostsProvider(UnicastHostsProvider provider)
           
 void setNodesProvider(DiscoveryNodesProvider nodesProvider)
           
 
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.common.component.CloseableComponent
close
 

Field Detail

LIMIT_PORTS_COUNT

public static final int LIMIT_PORTS_COUNT
See Also:
Constant Field Values
Constructor Detail

UnicastZenPing

public UnicastZenPing(ThreadPool threadPool,
                      TransportService transportService,
                      ClusterName clusterName)

UnicastZenPing

public UnicastZenPing(Settings settings,
                      ThreadPool threadPool,
                      TransportService transportService,
                      ClusterName clusterName,
                      @Nullable
                      Set<UnicastHostsProvider> unicastHostsProviders)
Method Detail

doStart

protected void doStart()
                throws ElasticSearchException
Specified by:
doStart in class AbstractLifecycleComponent<ZenPing>
Throws:
ElasticSearchException

doStop

protected void doStop()
               throws ElasticSearchException
Specified by:
doStop in class AbstractLifecycleComponent<ZenPing>
Throws:
ElasticSearchException

doClose

protected void doClose()
                throws ElasticSearchException
Specified by:
doClose in class AbstractLifecycleComponent<ZenPing>
Throws:
ElasticSearchException

addHostsProvider

public void addHostsProvider(UnicastHostsProvider provider)

removeHostsProvider

public void removeHostsProvider(UnicastHostsProvider provider)

setNodesProvider

public void setNodesProvider(DiscoveryNodesProvider nodesProvider)
Specified by:
setNodesProvider in interface ZenPing

pingAndWait

public ZenPing.PingResponse[] pingAndWait(TimeValue timeout)

ping

public void ping(ZenPing.PingListener listener,
                 TimeValue timeout)
          throws ElasticSearchException
Specified by:
ping in interface ZenPing
Throws:
ElasticSearchException


Copyright © 2009-2012. All Rights Reserved.