org.elasticsearch.discovery
Interface Discovery
- All Superinterfaces:
- CloseableComponent, LifecycleComponent<Discovery>
- All Known Implementing Classes:
- LocalDiscovery, ZenDiscovery
public interface Discovery
- extends LifecycleComponent<Discovery>
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.
addListener
void addListener(InitialStateDiscoveryListener listener)
removeListener
void removeListener(InitialStateDiscoveryListener listener)
nodeDescription
java.lang.String nodeDescription()
firstMaster
boolean firstMaster()
- Is the discovery of this node caused this node to be the first master in the cluster.
publish
void publish(ClusterState clusterState)
- Publish all the changes to the cluster from the master (can be called just by the master). The publish
process should not publish this state to the master as well! (the master is sending it...).