public interface ClusterService extends LifecycleComponent<ClusterService>
ClusterStateListener
)
and submit state update tasks (ClusterStateUpdateTask
.Modifier and Type | Method and Description |
---|---|
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,
and is executed after the clusterstate has been successfully applied ie.
|
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.
|
int |
numberOfPendingTasks()
Returns the number of currently pending tasks.
|
OperationRouting |
operationRouting()
The operation routing.
|
List<PendingClusterTask> |
pendingTasks()
Returns the tasks that are pending.
|
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
|
void |
removeInitialStateBlock(ClusterBlock block)
Remove an initial block to be set on the first cluster state created.
|
ClusterState |
state()
The current state.
|
void |
submitStateUpdateTask(String source,
ClusterStateUpdateTask updateTask)
Submits a task that will update the cluster state (the task has a default priority of
Priority.NORMAL ). |
void |
submitStateUpdateTask(String source,
Priority priority,
ClusterStateUpdateTask updateTask)
Submits a task that will update the cluster state.
|
addLifecycleListener, lifecycleState, removeLifecycleListener, start, stop
close
DiscoveryNode localNode()
ClusterState state()
void addInitialStateBlock(ClusterBlock block) throws ElasticsearchIllegalStateException
void removeInitialStateBlock(ClusterBlock block) throws ElasticsearchIllegalStateException
OperationRouting operationRouting()
void addFirst(ClusterStateListener listener)
void addLast(ClusterStateListener listener)
void add(ClusterStateListener listener)
void remove(ClusterStateListener listener)
void add(LocalNodeMasterListener listener)
void remove(LocalNodeMasterListener listener)
void add(TimeValue timeout, TimeoutClusterStateListener listener)
ClusterState.ClusterStateStatus.APPLIED
void submitStateUpdateTask(String source, Priority priority, ClusterStateUpdateTask updateTask)
void submitStateUpdateTask(String source, ClusterStateUpdateTask updateTask)
Priority.NORMAL
).List<PendingClusterTask> pendingTasks()
int numberOfPendingTasks()
Copyright © 2009–2015. All rights reserved.