org.elasticsearch.discovery.zen
Class ZenDiscovery

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.common.component.AbstractLifecycleComponent<Discovery>
          extended by org.elasticsearch.discovery.zen.ZenDiscovery
All Implemented Interfaces:
CloseableComponent, LifecycleComponent<Discovery>, Discovery, DiscoveryNodesProvider

public class ZenDiscovery
extends AbstractLifecycleComponent<Discovery>
implements Discovery, DiscoveryNodesProvider


Field Summary
 ClusterBlock NO_MASTER_BLOCK
           
 
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
ZenDiscovery(Settings settings, ClusterName clusterName, ThreadPool threadPool, TransportService transportService, ClusterService clusterService, ZenPingService pingService)
           
 
Method Summary
 void addListener(InitialStateDiscoveryListener listener)
           
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 DiscoveryNode localNode()
           
 java.lang.String nodeDescription()
           
 DiscoveryNodes nodes()
           
 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 class org.elasticsearch.common.component.AbstractLifecycleComponent
addLifecycleListener, close, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.common.component.CloseableComponent
close
 

Field Detail

NO_MASTER_BLOCK

public final ClusterBlock NO_MASTER_BLOCK
Constructor Detail

ZenDiscovery

@Inject
public ZenDiscovery(Settings settings,
                           ClusterName clusterName,
                           ThreadPool threadPool,
                           TransportService transportService,
                           ClusterService clusterService,
                           ZenPingService pingService)
Method Detail

doStart

protected void doStart()
                throws ElasticSearchException
Specified by:
doStart in class AbstractLifecycleComponent<Discovery>
Throws:
ElasticSearchException

doStop

protected void doStop()
               throws ElasticSearchException
Specified by:
doStop in class AbstractLifecycleComponent<Discovery>
Throws:
ElasticSearchException

doClose

protected void doClose()
                throws ElasticSearchException
Specified by:
doClose in class AbstractLifecycleComponent<Discovery>
Throws:
ElasticSearchException

localNode

public DiscoveryNode localNode()
Specified by:
localNode in interface Discovery

addListener

public void addListener(InitialStateDiscoveryListener listener)
Specified by:
addListener in interface Discovery

removeListener

public void removeListener(InitialStateDiscoveryListener listener)
Specified by:
removeListener in interface Discovery

nodeDescription

public java.lang.String nodeDescription()
Specified by:
nodeDescription in interface Discovery

nodes

public DiscoveryNodes nodes()
Specified by:
nodes in interface DiscoveryNodesProvider

publish

public void publish(ClusterState clusterState)
Description copied from interface: Discovery
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...).

Specified by:
publish in interface Discovery