Module org.elasticsearch.server
Package org.elasticsearch.cluster
Class SequentialAckingBatchedTaskExecutor<Task extends AckedClusterStateUpdateTask>
java.lang.Object
org.elasticsearch.cluster.SimpleBatchedAckListenerTaskExecutor<Task>
org.elasticsearch.cluster.SequentialAckingBatchedTaskExecutor<Task>
- Type Parameters:
Task
- The type of the task that extendsAckedClusterStateUpdateTask
.
- All Implemented Interfaces:
ClusterStateTaskExecutor<Task>
public class SequentialAckingBatchedTaskExecutor<Task extends AckedClusterStateUpdateTask>
extends SimpleBatchedAckListenerTaskExecutor<Task>
A task executor that executes tasks sequentially, allowing each task to acknowledge the cluster state update.
This executor is used for tasks that need to be executed one after another, where each task can produce a new
cluster state and can listen for acknowledgments.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.ClusterStateTaskExecutor
ClusterStateTaskExecutor.BatchExecutionContext<T extends ClusterStateTaskListener>, ClusterStateTaskExecutor.TaskContext<T extends ClusterStateTaskListener>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteTask
(Task task, ClusterState clusterState) Executes the provided task from the batch.Methods inherited from class org.elasticsearch.cluster.SimpleBatchedAckListenerTaskExecutor
afterBatchExecution, clusterStatePublished, clusterStatePublished, execute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.cluster.ClusterStateTaskExecutor
describeTasks, runOnlyOnMaster
-
Constructor Details
-
SequentialAckingBatchedTaskExecutor
public SequentialAckingBatchedTaskExecutor()
-
-
Method Details
-
executeTask
public Tuple<ClusterState,ClusterStateAckListener> executeTask(Task task, ClusterState clusterState) throws Exception Description copied from class:SimpleBatchedAckListenerTaskExecutor
Executes the provided task from the batch.- Specified by:
executeTask
in classSimpleBatchedAckListenerTaskExecutor<Task extends AckedClusterStateUpdateTask>
- Parameters:
task
- The task to be executed.clusterState
- The cluster state on which the task should be executed.- Returns:
- A tuple consisting of the resulting cluster state after executing this task, and a
ClusterStateAckListener
. The listener is completed if the publication succeeds and the nodes ack the state update. The returned cluster state serves as the cluster state on which the next task in the batch will run. - Throws:
Exception
-