Interface ClusterStateTaskExecutor<T>

All Known Implementing Classes:
AckedClusterStateUpdateTask, ClusterStateUpdateTask, JoinTaskExecutor, LocalClusterUpdateTask, MigrationResultsUpdateTask, NodeRemovalClusterStateTaskExecutor, ShardStateAction.ShardFailedClusterStateTaskExecutor, ShardStateAction.ShardStartedClusterStateTaskExecutor, SystemIndexMetadataUpgradeService.SystemIndexMetadataUpdateTask

public interface ClusterStateTaskExecutor<T>
  • Method Details

    • execute

      Update the cluster state based on the current state and the given tasks. Return the *same instance* if no state should be changed.
      Throws:
      Exception
    • runOnlyOnMaster

      default boolean runOnlyOnMaster()
      indicates whether this executor should only run if the current node is master
    • clusterStatePublished

      default 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.
      Parameters:
      clusterStatePublicationEvent - the change event for this cluster state publication, containing both old and new states
    • describeTasks

      default String describeTasks(List<T> tasks)
      Builds 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.