public abstract class ClusterStateUpdateTask extends java.lang.Object implements ClusterStateTaskConfig, ClusterStateTaskExecutor<ClusterStateUpdateTask>, ClusterStateTaskListener
ClusterStateTaskConfig.Basic
ClusterStateTaskExecutor.BatchResult<T>, ClusterStateTaskExecutor.TaskResult
Constructor and Description |
---|
ClusterStateUpdateTask() |
ClusterStateUpdateTask(Priority priority) |
Modifier and Type | Method and Description |
---|---|
abstract ClusterState |
execute(ClusterState currentState)
Update the cluster state based on the current state.
|
ClusterStateTaskExecutor.BatchResult<ClusterStateUpdateTask> |
execute(ClusterState currentState,
java.util.List<ClusterStateUpdateTask> tasks)
Update the cluster state based on the current state and the given tasks.
|
abstract void |
onFailure(java.lang.String source,
java.lang.Throwable t)
A callback called when execute fails.
|
Priority |
priority()
The
Priority for this cluster state update task configuration. |
TimeValue |
timeout()
If the cluster state update task wasn't processed by the provided timeout, call
onFailure(String, Throwable) . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, build
clusterStatePublished, runOnlyOnMaster
clusterStateProcessed, onNoLongerMaster
public ClusterStateUpdateTask()
public ClusterStateUpdateTask(Priority priority)
public final ClusterStateTaskExecutor.BatchResult<ClusterStateUpdateTask> execute(ClusterState currentState, java.util.List<ClusterStateUpdateTask> tasks) throws java.lang.Exception
ClusterStateTaskExecutor
execute
in interface ClusterStateTaskExecutor<ClusterStateUpdateTask>
java.lang.Exception
public abstract ClusterState execute(ClusterState currentState) throws java.lang.Exception
java.lang.Exception
public abstract void onFailure(java.lang.String source, java.lang.Throwable t)
onFailure
in interface ClusterStateTaskListener
@Nullable public TimeValue timeout()
onFailure(String, Throwable)
. May return null to indicate no timeout is needed (default).timeout
in interface ClusterStateTaskConfig
public Priority priority()
ClusterStateTaskConfig
Priority
for this cluster state update task configuration.priority
in interface ClusterStateTaskConfig