- All Known Implementing Classes:
public interface ClusterStateTaskExecutor<T>
Nested Class Summary
Method SummaryModifier and TypeMethodDescription
default voidCallback 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.
default booleanindicates whether this executor should only run if the current node is master
(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
(ClusterStatePublicationEvent clusterStatePublicationEvent)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.
clusterStatePublicationEvent- the change event for this cluster state publication, 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.