- All Known Implementing Classes:
public interface ClusterStateTaskExecutor<T>
Nested Class SummaryModifier and TypeInterfaceDescription
static classRepresents the result of a batched execution of cluster state update tasks
Method SummaryModifier and TypeMethodDescription
ClusterChangedEvent clusterChangedEvent)(Callback invoked after new cluster state is published.
default StringBuilds a concise description of a list of tasks (to be used in logging etc.).Update the cluster state based on the current state and the given tasks.
()indicates whether this executor should only run if the current node is master
executeClusterStateTaskExecutor.ClusterTasksResult<T> execute(ClusterState currentState, List<T> tasks) throws ExceptionUpdate the cluster state based on the current state and the given tasks. Return the *same instance* if no state should be changed.
runOnlyOnMasterdefault boolean runOnlyOnMaster()indicates whether this executor should only run if the current node is master
clusterStatePublisheddefault void clusterStatePublished(ClusterChangedEvent clusterChangedEvent)Callback invoked after new cluster state is published. Note that this method is not invoked if the cluster state was not updated. Note that this method will be executed using system context.
clusterChangedEvent- the change event for this cluster state change, containing both old and new states
describeTasksBuilds a concise description of a list of tasks (to be used in logging etc.). Note that the tasks given are not necessarily the same as those that will be passed to
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.