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 |
lifecycle
componentSettings, 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, stop
nodeName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
close
public 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>
ElasticsearchException
protected void doStop() throws ElasticsearchException
doStop
in class AbstractLifecycleComponent<ZenPing>
ElasticsearchException
protected void doClose() throws ElasticsearchException
doClose
in class AbstractLifecycleComponent<ZenPing>
ElasticsearchException
public void addHostsProvider(UnicastHostsProvider provider)
public void removeHostsProvider(UnicastHostsProvider provider)
public void setPingContextProvider(PingContextProvider contextProvider)
setPingContextProvider
in interface ZenPing
public void clearTemporalResponses()
public ZenPing.PingResponse[] pingAndWait(TimeValue timeout)
public void ping(ZenPing.PingListener listener, TimeValue timeout) throws ElasticsearchException
ping
in interface ZenPing
ElasticsearchException
Copyright © 2009–2015. All rights reserved.