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(TimeValue timeout, TimeoutClusterStateListener listener)
          Adds a cluster state listener that will timeout after the provided timeout.
 DiscoveryNode localNode()
          The local node.
 void remove(ClusterStateListener listener)
          Removes a listener for updated cluster states.
 ClusterState state()
          The current state.
 void submitStateUpdateTask(java.lang.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.


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(TimeValue timeout,
         TimeoutClusterStateListener listener)
Adds a cluster state listener that will timeout after the provided timeout.


submitStateUpdateTask

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