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.


Method Summary
 void addListener(InitialStateDiscoveryListener listener)
           
 boolean firstMaster()
          Is the discovery of this node caused this node to be the first master in the cluster.
 java.lang.String nodeDescription()
           
 void publish(ClusterState clusterState)
          Publish all the changes to the cluster from the master (can be called just by the master).
 void removeListener(InitialStateDiscoveryListener listener)
           
 
Methods inherited from interface org.elasticsearch.util.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.util.component.CloseableComponent
close
 

Method Detail

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...).