Package org.elasticsearch.cluster
Class NodeConnectionsService
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractLifecycleComponent
-
- org.elasticsearch.cluster.NodeConnectionsService
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LifecycleComponent
,Releasable
public class NodeConnectionsService extends AbstractLifecycleComponent
This component is responsible for connecting to nodes once they are added to the cluster state, and disconnect when they are removed. Also, it periodically checks that all connections are still open and if needed restores them. Note that this component is *not* responsible for removing nodes from the cluster if they disconnect / do not respond to pings. This is done byNodesFaultDetection
. Master fault detection is done byMasterFaultDetection
.
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<TimeValue>
CLUSTER_NODE_RECONNECT_INTERVAL_SETTING
-
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
-
-
Constructor Summary
Constructors Constructor Description NodeConnectionsService(Settings settings, ThreadPool threadPool, TransportService transportService)
-
Method Summary
Modifier and Type Method Description void
connectToNodes(DiscoveryNodes discoveryNodes)
void
disconnectFromNodesExcept(DiscoveryNodes nodesToKeep)
Disconnects from all nodes except the ones provided as parameterprotected void
doClose()
protected void
doStart()
protected void
doStop()
-
Methods inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
-
-
-
-
Constructor Detail
-
NodeConnectionsService
@Inject public NodeConnectionsService(Settings settings, ThreadPool threadPool, TransportService transportService)
-
-
Method Detail
-
connectToNodes
public void connectToNodes(DiscoveryNodes discoveryNodes)
-
disconnectFromNodesExcept
public void disconnectFromNodesExcept(DiscoveryNodes nodesToKeep)
Disconnects from all nodes except the ones provided as parameter
-
doStart
protected void doStart()
- Specified by:
doStart
in classAbstractLifecycleComponent
-
doStop
protected void doStop()
- Specified by:
doStop
in classAbstractLifecycleComponent
-
doClose
protected void doClose()
- Specified by:
doClose
in classAbstractLifecycleComponent
-
-