public class NodesFaultDetection extends FaultDetection
| Modifier and Type | Class and Description |
|---|---|
static class |
NodesFaultDetection.Listener |
static class |
NodesFaultDetection.PingRequest |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PING_ACTION_NAME |
clusterName, CONNECT_ON_NETWORK_DISCONNECT_SETTING, connectionListener, connectOnNetworkDisconnect, PING_INTERVAL_SETTING, PING_RETRIES_SETTING, PING_TIMEOUT_SETTING, pingInterval, pingRetryCount, pingRetryTimeout, REGISTER_CONNECTION_LISTENER_SETTING, registerConnectionListener, threadPool, transportServicedeprecationLogger, logger, settings| Constructor and Description |
|---|
NodesFaultDetection(Settings settings,
ThreadPool threadPool,
TransportService transportService,
java.util.function.Supplier<ClusterState> clusterStateSupplier,
ClusterName clusterName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(NodesFaultDetection.Listener listener) |
void |
close() |
java.util.Set<DiscoveryNode> |
getNodes()
Gets the current set of nodes involved in node fault detection.
|
protected void |
handleTransportDisconnect(DiscoveryNode node)
This method will be called when the
TransportService raised a node disconnected event |
void |
removeListener(NodesFaultDetection.Listener listener) |
void |
setLocalNode(DiscoveryNode localNode) |
NodesFaultDetection |
stop()
stops all pinging
|
void |
updateNodesAndPing(ClusterState clusterState)
make sure that nodes in clusterState are pinged.
|
logDeprecatedSetting, logRemovedSetting, nodeNamepublic static final java.lang.String PING_ACTION_NAME
public NodesFaultDetection(Settings settings, ThreadPool threadPool, TransportService transportService, java.util.function.Supplier<ClusterState> clusterStateSupplier, ClusterName clusterName)
public void setLocalNode(DiscoveryNode localNode)
public void addListener(NodesFaultDetection.Listener listener)
public void removeListener(NodesFaultDetection.Listener listener)
public java.util.Set<DiscoveryNode> getNodes()
public void updateNodesAndPing(ClusterState clusterState)
public NodesFaultDetection stop()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class FaultDetectionprotected void handleTransportDisconnect(DiscoveryNode node)
FaultDetectionTransportService raised a node disconnected event