java.io.Closeable, java.lang.AutoCloseable, LifecycleComponent, Releasable, Discoverypublic class SingleNodeDiscovery extends AbstractLifecycleComponent implements Discovery
Discovery.AckListener, Discovery.FailedToCommitClusterStateException| Modifier and Type | Field | Description |
|---|---|---|
protected TransportService |
transportService |
deprecationLogger, logger, settingslifecycle| Constructor | Description |
|---|---|
SingleNodeDiscovery(Settings settings,
TransportService transportService,
MasterService masterService,
ClusterApplier clusterApplier) |
| Modifier and Type | Method | Description |
|---|---|---|
protected ClusterState |
createInitialState(DiscoveryNode localNode) |
|
protected void |
doClose() |
|
protected void |
doStart() |
|
protected void |
doStop() |
|
void |
publish(ClusterChangedEvent event,
Discovery.AckListener ackListener) |
Publish all the changes to the cluster from the master (can be called just by the master).
|
void |
startInitialJoin() |
Triggers the first join cycle
|
DiscoveryStats |
stats() |
logDeprecatedSetting, logRemovedSetting, nodeNameaddLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stopaddLifecycleListener, lifecycleState, removeLifecycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseprotected final TransportService transportService
public SingleNodeDiscovery(Settings settings, TransportService transportService, MasterService masterService, ClusterApplier clusterApplier)
public void publish(ClusterChangedEvent event, Discovery.AckListener ackListener)
DiscoveryDiscovery.AckListener allows to keep track of the ack received from nodes, and verify whether
they updated their own cluster state or not.
The method is guaranteed to throw a Discovery.FailedToCommitClusterStateException if the change is not committed and should be rejected.
Any other exception signals the something wrong happened but the change is committed.public DiscoveryStats stats()
public void startInitialJoin()
DiscoverystartInitialJoin in interface Discoveryprotected void doStart()
doStart in class AbstractLifecycleComponentprotected ClusterState createInitialState(DiscoveryNode localNode)
protected void doStop()
doStop in class AbstractLifecycleComponentprotected void doClose()
throws java.io.IOException
doClose in class AbstractLifecycleComponentjava.io.IOException