public class UnicastZenPing extends AbstractLifecycleComponent<ZenPing> implements ZenPing
ZenPing.PingCollection, ZenPing.PingListener, ZenPing.PingResponse| Modifier and Type | Field and Description |
|---|---|
static String |
ACTION_NAME |
static String |
ACTION_NAME_GTE_1_4
when pinging the initial configured target hosts, we do not know their version.
|
static int |
LIMIT_PORTS_COUNT |
lifecyclecomponentSettings, logger, settings| Constructor and Description |
|---|
UnicastZenPing(Settings settings,
ThreadPool threadPool,
TransportService transportService,
ClusterName clusterName,
Version version,
ElectMasterService electMasterService,
Set<UnicastHostsProvider> unicastHostsProviders) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHostsProvider(UnicastHostsProvider provider) |
void |
clearTemporalResponses()
Clears the list of cached ping responses.
|
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 |
setPingContextProvider(PingContextProvider contextProvider) |
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopnodeNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifecycleListener, lifecycleState, removeLifecycleListener, start, stopclosepublic static final String ACTION_NAME
public static final String ACTION_NAME_GTE_1_4
ActionNotFoundTransportException
we know we speak to a node with <1.4 version, and fall back to use ACTION_NAME.public static final int LIMIT_PORTS_COUNT
public UnicastZenPing(Settings settings, ThreadPool threadPool, TransportService transportService, ClusterName clusterName, Version version, ElectMasterService electMasterService, @Nullable Set<UnicastHostsProvider> unicastHostsProviders)
protected void doStart()
throws ElasticsearchException
doStart in class AbstractLifecycleComponent<ZenPing>ElasticsearchExceptionprotected void doStop()
throws ElasticsearchException
doStop in class AbstractLifecycleComponent<ZenPing>ElasticsearchExceptionprotected void doClose()
throws ElasticsearchException
doClose in class AbstractLifecycleComponent<ZenPing>ElasticsearchExceptionpublic void addHostsProvider(UnicastHostsProvider provider)
public void removeHostsProvider(UnicastHostsProvider provider)
public void setPingContextProvider(PingContextProvider contextProvider)
setPingContextProvider in interface ZenPingpublic void clearTemporalResponses()
public ZenPing.PingResponse[] pingAndWait(TimeValue timeout)
public void ping(ZenPing.PingListener listener, TimeValue timeout) throws ElasticsearchException
ping in interface ZenPingElasticsearchExceptionCopyright © 2009–2016. All rights reserved.