org.elasticsearch.discovery
Class DiscoveryService

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

public class DiscoveryService
extends AbstractLifecycleComponent<DiscoveryService>


Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
DiscoveryService(Settings settings, Discovery discovery)
           
 
Method Summary
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 boolean initialStateReceived()
          Returns true if the initial state was received within the timeout waiting for it on doStart().
 DiscoveryNode localNode()
           
 String nodeDescription()
           
 void publish(ClusterState clusterState)
          Publish all the changes to the cluster from the master (can be called just by the master).
 
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
 

Constructor Detail

DiscoveryService

@Inject
public DiscoveryService(Settings settings,
                               Discovery discovery)
Method Detail

doStart

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

doStop

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

doClose

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

localNode

public DiscoveryNode localNode()

initialStateReceived

public boolean initialStateReceived()
Returns true if the initial state was received within the timeout waiting for it on doStart().


nodeDescription

public String nodeDescription()

publish

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



Copyright © 2009-2012. All Rights Reserved.