public interface ClusterStateTaskExecutor<T>
Modifier and Type | Interface and Description |
---|---|
static class |
ClusterStateTaskExecutor.ClusterTasksResult<T>
Represents the result of a batched execution of cluster state update tasks
|
static class |
ClusterStateTaskExecutor.TaskResult |
Modifier and Type | Method and Description |
---|---|
default void |
clusterStatePublished(ClusterChangedEvent clusterChangedEvent)
Callback invoked after new cluster state is published.
|
default java.lang.String |
describeTasks(java.util.List<T> tasks)
Builds a concise description of a list of tasks (to be used in logging etc.).
|
ClusterStateTaskExecutor.ClusterTasksResult<T> |
execute(ClusterState currentState,
java.util.List<T> tasks)
Update the cluster state based on the current state and the given tasks.
|
default boolean |
runOnlyOnMaster()
indicates whether this executor should only run if the current node is master
|
ClusterStateTaskExecutor.ClusterTasksResult<T> execute(ClusterState currentState, java.util.List<T> tasks) throws java.lang.Exception
java.lang.Exception
default boolean runOnlyOnMaster()
default void clusterStatePublished(ClusterChangedEvent clusterChangedEvent)
clusterChangedEvent
- the change event for this cluster state change, containing
both old and new statesdefault java.lang.String describeTasks(java.util.List<T> tasks)
execute(ClusterState, List)
.
but are guaranteed to be a subset of them. This method can be called multiple times with different lists before execution.
This allows groupd task description but the submitting source.