public abstract class LocalClusterUpdateTask extends java.lang.Object implements ClusterStateTaskConfig, ClusterStateTaskExecutor<LocalClusterUpdateTask>, ClusterStateTaskListener
ClusterStateTaskConfig.Basic
ClusterStateTaskExecutor.ClusterTasksResult<T>, ClusterStateTaskExecutor.TaskResult
Constructor and Description |
---|
LocalClusterUpdateTask() |
LocalClusterUpdateTask(Priority priority) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
describeTasks(java.util.List<LocalClusterUpdateTask> tasks)
Builds a concise description of a list of tasks (to be used in logging etc.).
|
abstract ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> |
execute(ClusterState currentState) |
ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> |
execute(ClusterState currentState,
java.util.List<LocalClusterUpdateTask> tasks)
Update the cluster state based on the current state and the given tasks.
|
static ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> |
newState(ClusterState clusterState)
locally apply cluster state received from a master
|
static ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> |
noMaster()
node stepped down as master or has lost connection to the master
|
Priority |
priority()
The
Priority for this cluster state update task configuration. |
boolean |
runOnlyOnMaster()
indicates whether this executor should only run if the current node is master
|
TimeValue |
timeout()
The timeout for this cluster state update task configuration.
|
static ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> |
unchanged()
no changes were made to the cluster state.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build, build
clusterStatePublished
clusterStateProcessed, onFailure, onNoLongerMaster
public LocalClusterUpdateTask()
public LocalClusterUpdateTask(Priority priority)
public abstract ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> execute(ClusterState currentState) throws java.lang.Exception
java.lang.Exception
public final ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> execute(ClusterState currentState, java.util.List<LocalClusterUpdateTask> tasks) throws java.lang.Exception
ClusterStateTaskExecutor
execute
in interface ClusterStateTaskExecutor<LocalClusterUpdateTask>
java.lang.Exception
public static ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> noMaster()
public static ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> unchanged()
public static ClusterStateTaskExecutor.ClusterTasksResult<LocalClusterUpdateTask> newState(ClusterState clusterState)
public java.lang.String describeTasks(java.util.List<LocalClusterUpdateTask> tasks)
ClusterStateTaskExecutor
ClusterStateTaskExecutor.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.describeTasks
in interface ClusterStateTaskExecutor<LocalClusterUpdateTask>
@Nullable public TimeValue timeout()
ClusterStateTaskConfig
ClusterStateTaskListener.onFailure(String, Exception)
is invoked.timeout
in interface ClusterStateTaskConfig
public Priority priority()
ClusterStateTaskConfig
Priority
for this cluster state update task configuration.priority
in interface ClusterStateTaskConfig
public final boolean runOnlyOnMaster()
ClusterStateTaskExecutor
runOnlyOnMaster
in interface ClusterStateTaskExecutor<LocalClusterUpdateTask>