org.elasticsearch.cluster.service
Class InternalClusterService

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.common.component.AbstractLifecycleComponent<ClusterService>
          extended by org.elasticsearch.cluster.service.InternalClusterService
All Implemented Interfaces:
ClusterService, CloseableComponent, LifecycleComponent<ClusterService>

public class InternalClusterService
extends AbstractLifecycleComponent<ClusterService>
implements ClusterService


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
InternalClusterService(Settings settings, DiscoveryService discoveryService, OperationRouting operationRouting, TransportService transportService, NodeSettingsService nodeSettingsService, ThreadPool threadPool)
           
 
Method Summary
 void add(ClusterStateListener listener)
          Adds a listener for updated cluster states.
 void add(LocalNodeMasterListener listener)
          Add a listener for on/off local node master events
 void add(TimeValue timeout, TimeoutClusterStateListener listener)
          Adds a cluster state listener that will timeout after the provided timeout.
 void addFirst(ClusterStateListener listener)
          Adds a priority listener for updated cluster states.
 void addInitialStateBlock(ClusterBlock block)
          Adds an initial block to be set on the first cluster state created.
 void addLast(ClusterStateListener listener)
          Adds last listener.
protected  void doClose()
           
protected  void doStart()
           
protected  void doStop()
           
 DiscoveryNode localNode()
          The local node.
 OperationRouting operationRouting()
          The operation routing.
 void remove(ClusterStateListener listener)
          Removes a listener for updated cluster states.
 void remove(LocalNodeMasterListener listener)
          Remove the given listener for on/off local master events
 NodeSettingsService settingsService()
           
 ClusterState state()
          The current state.
 void submitStateUpdateTask(String source, ClusterStateUpdateTask updateTask)
          Submits a task that will update the cluster state.
 
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

InternalClusterService

@Inject
public InternalClusterService(Settings settings,
                                     DiscoveryService discoveryService,
                                     OperationRouting operationRouting,
                                     TransportService transportService,
                                     NodeSettingsService nodeSettingsService,
                                     ThreadPool threadPool)
Method Detail

settingsService

public NodeSettingsService settingsService()

addInitialStateBlock

public void addInitialStateBlock(ClusterBlock block)
                          throws ElasticSearchIllegalStateException
Description copied from interface: ClusterService
Adds an initial block to be set on the first cluster state created.

Specified by:
addInitialStateBlock in interface ClusterService
Throws:
ElasticSearchIllegalStateException

doStart

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

doStop

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

doClose

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

localNode

public DiscoveryNode localNode()
Description copied from interface: ClusterService
The local node.

Specified by:
localNode in interface ClusterService

operationRouting

public OperationRouting operationRouting()
Description copied from interface: ClusterService
The operation routing.

Specified by:
operationRouting in interface ClusterService

state

public ClusterState state()
Description copied from interface: ClusterService
The current state.

Specified by:
state in interface ClusterService

addFirst

public void addFirst(ClusterStateListener listener)
Description copied from interface: ClusterService
Adds a priority listener for updated cluster states.

Specified by:
addFirst in interface ClusterService

addLast

public void addLast(ClusterStateListener listener)
Description copied from interface: ClusterService
Adds last listener.

Specified by:
addLast in interface ClusterService

add

public void add(ClusterStateListener listener)
Description copied from interface: ClusterService
Adds a listener for updated cluster states.

Specified by:
add in interface ClusterService

remove

public void remove(ClusterStateListener listener)
Description copied from interface: ClusterService
Removes a listener for updated cluster states.

Specified by:
remove in interface ClusterService

add

public void add(LocalNodeMasterListener listener)
Description copied from interface: ClusterService
Add a listener for on/off local node master events

Specified by:
add in interface ClusterService

remove

public void remove(LocalNodeMasterListener listener)
Description copied from interface: ClusterService
Remove the given listener for on/off local master events

Specified by:
remove in interface ClusterService

add

public void add(TimeValue timeout,
                TimeoutClusterStateListener listener)
Description copied from interface: ClusterService
Adds a cluster state listener that will timeout after the provided timeout.

Specified by:
add in interface ClusterService

submitStateUpdateTask

public void submitStateUpdateTask(String source,
                                  ClusterStateUpdateTask updateTask)
Description copied from interface: ClusterService
Submits a task that will update the cluster state.

Specified by:
submitStateUpdateTask in interface ClusterService


Copyright © 2009-2012. All Rights Reserved.