org.elasticsearch.discovery.local
Class LocalDiscovery

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

public class LocalDiscovery
extends AbstractLifecycleComponent<Discovery>
implements Discovery


Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractLifecycleComponent
lifecycle
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Fields inherited from interface org.elasticsearch.discovery.Discovery
NO_MASTER_BLOCK
 
Constructor Summary
LocalDiscovery(Settings settings, ClusterName clusterName, TransportService transportService, ClusterService clusterService, DiscoveryNodeService discoveryNodeService)
           
 
Method Summary
 void addListener(InitialStateDiscoveryListener listener)
           
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 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).
 void removeListener(InitialStateDiscoveryListener listener)
           
 void setNodeService(NodeService nodeService)
          Here as a hack to solve dep injection problem...
 
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
 

Constructor Detail

LocalDiscovery

@Inject
public LocalDiscovery(Settings settings,
                             ClusterName clusterName,
                             TransportService transportService,
                             ClusterService clusterService,
                             DiscoveryNodeService discoveryNodeService)
Method Detail

setNodeService

public void setNodeService(@Nullable
                           NodeService nodeService)
Description copied from interface: Discovery
Here as a hack to solve dep injection problem...

Specified by:
setNodeService in interface Discovery

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 String nodeDescription()
Specified by:
nodeDescription in interface Discovery

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


Copyright © 2009-2012. All Rights Reserved.