Package org.elasticsearch.discovery.zen
Class MasterFaultDetection
- java.lang.Object
-
- org.elasticsearch.discovery.zen.FaultDetection
-
- org.elasticsearch.discovery.zen.MasterFaultDetection
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class MasterFaultDetection extends FaultDetection
A fault detection that pings the master periodically to see if its alive.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MasterFaultDetection.Listener
static class
MasterFaultDetection.MasterPingRequest
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MASTER_PING_ACTION_NAME
-
Fields inherited from class org.elasticsearch.discovery.zen.FaultDetection
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, transportService
-
-
Constructor Summary
Constructors Constructor Description MasterFaultDetection(Settings settings, ThreadPool threadPool, TransportService transportService, java.util.function.Supplier<ClusterState> clusterStateSupplier, MasterService masterService, ClusterName clusterName)
-
Method Summary
Modifier and Type Method Description void
addListener(MasterFaultDetection.Listener listener)
void
close()
protected void
handleTransportDisconnect(DiscoveryNode node)
DiscoveryNode
masterNode()
void
removeListener(MasterFaultDetection.Listener listener)
void
restart(DiscoveryNode masterNode, java.lang.String reason)
void
stop(java.lang.String reason)
-
-
-
Field Detail
-
MASTER_PING_ACTION_NAME
public static final java.lang.String MASTER_PING_ACTION_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MasterFaultDetection
public MasterFaultDetection(Settings settings, ThreadPool threadPool, TransportService transportService, java.util.function.Supplier<ClusterState> clusterStateSupplier, MasterService masterService, ClusterName clusterName)
-
-
Method Detail
-
masterNode
public DiscoveryNode masterNode()
-
addListener
public void addListener(MasterFaultDetection.Listener listener)
-
removeListener
public void removeListener(MasterFaultDetection.Listener listener)
-
restart
public void restart(DiscoveryNode masterNode, java.lang.String reason)
-
stop
public void stop(java.lang.String reason)
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classFaultDetection
-
handleTransportDisconnect
protected void handleTransportDisconnect(DiscoveryNode node)
-
-