Package org.elasticsearch.discovery
Interface Discovery
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,LifecycleComponent
,Releasable
- All Known Implementing Classes:
SingleNodeDiscovery
,ZenDiscovery
public interface Discovery extends LifecycleComponent
A pluggable module allowing to implement discovery of other nodes, publishing of the cluster state to all nodes, electing a master of the cluster that raises cluster state change events.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Discovery.AckListener
static class
Discovery.FailedToCommitClusterStateException
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
publish(ClusterChangedEvent clusterChangedEvent, 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 cycleDiscoveryStats
stats()
-
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
-
Methods inherited from interface org.elasticsearch.common.lease.Releasable
close
-
-
-
-
Method Detail
-
publish
void publish(ClusterChangedEvent clusterChangedEvent, Discovery.AckListener ackListener)
Publish all the changes to the cluster from the master (can be called just by the master). The publish process should apply this state to the master as well! TheDiscovery.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 aDiscovery.FailedToCommitClusterStateException
if the change is not committed and should be rejected. Any other exception signals the something wrong happened but the change is committed.
-
stats
DiscoveryStats stats()
- Returns:
- stats about the discovery
-
startInitialJoin
void startInitialJoin()
Triggers the first join cycle
-
-