org.elasticsearch.cluster
Interface ClusterService

All Superinterfaces:
CloseableComponent, LifecycleComponent<ClusterService>
All Known Implementing Classes:
InternalClusterService

public interface ClusterService
extends LifecycleComponent<ClusterService>

The cluster service allowing to both register for cluster state events (ClusterStateListener) and submit state update tasks (ClusterStateUpdateTask.


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.
 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
 ClusterState state()
          The current state.
 void submitStateUpdateTask(String source, ClusterStateUpdateTask updateTask)
          Submits a task that will update the cluster state.
 
Methods inherited from interface org.elasticsearch.common.component.LifecycleComponent
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
 
Methods inherited from interface org.elasticsearch.common.component.CloseableComponent
close
 

Method Detail

localNode

DiscoveryNode localNode()
The local node.


state

ClusterState state()
The current state.


addInitialStateBlock

void addInitialStateBlock(ClusterBlock block)
                          throws ElasticSearchIllegalStateException
Adds an initial block to be set on the first cluster state created.

Throws:
ElasticSearchIllegalStateException

operationRouting

OperationRouting operationRouting()
The operation routing.


addFirst

void addFirst(ClusterStateListener listener)
Adds a priority listener for updated cluster states.


addLast

void addLast(ClusterStateListener listener)
Adds last listener.


add

void add(ClusterStateListener listener)
Adds a listener for updated cluster states.


remove

void remove(ClusterStateListener listener)
Removes a listener for updated cluster states.


add

void add(LocalNodeMasterListener listener)
Add a listener for on/off local node master events


remove

void remove(LocalNodeMasterListener listener)
Remove the given listener for on/off local master events


add

void add(TimeValue timeout,
         TimeoutClusterStateListener listener)
Adds a cluster state listener that will timeout after the provided timeout.


submitStateUpdateTask

void submitStateUpdateTask(String source,
                           ClusterStateUpdateTask updateTask)
Submits a task that will update the cluster state.



Copyright © 2009-2012. All Rights Reserved.