public abstract class ClusterStateUpdateTask extends ClusterStateTaskExecutor<ClusterStateUpdateTask> implements ClusterStateTaskConfig, ClusterStateTaskListener
ClusterStateTaskExecutor.BatchResult<T>, ClusterStateTaskExecutor.TaskResult| Constructor and Description |
|---|
ClusterStateUpdateTask() |
ClusterStateUpdateTask(Priority priority) |
| Modifier and Type | Method and Description |
|---|---|
void |
clusterStateProcessed(String source,
ClusterState oldState,
ClusterState newState)
Called when the result of the
ClusterStateTaskExecutor.execute(ClusterState, List) have been processed
properly by all listeners. |
abstract ClusterState |
execute(ClusterState currentState)
Update the cluster state based on the current state.
|
ClusterStateTaskExecutor.BatchResult<ClusterStateUpdateTask> |
execute(ClusterState currentState,
List<ClusterStateUpdateTask> tasks)
Update the cluster state based on the current state and the given tasks.
|
abstract void |
onFailure(String source,
Throwable t)
A callback called when execute fails.
|
void |
onNoLongerMaster(String source)
called when the task was rejected because the local node is no longer master
|
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). |
clusterStatePublished, runOnlyOnMasterpublic ClusterStateUpdateTask()
public ClusterStateUpdateTask(Priority priority)
public final ClusterStateTaskExecutor.BatchResult<ClusterStateUpdateTask> execute(ClusterState currentState, List<ClusterStateUpdateTask> tasks) throws Exception
ClusterStateTaskExecutorexecute in class ClusterStateTaskExecutor<ClusterStateUpdateTask>Exceptionpublic abstract ClusterState execute(ClusterState currentState) throws Exception
Exceptionpublic abstract void onFailure(String source, Throwable t)
onFailure in interface ClusterStateTaskListenerpublic void onNoLongerMaster(String source)
ClusterStateTaskListeneronNoLongerMaster in interface ClusterStateTaskListenerpublic void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState)
ClusterStateTaskListenerClusterStateTaskExecutor.execute(ClusterState, List) have been processed
properly by all listeners.clusterStateProcessed in interface ClusterStateTaskListener@Nullable public TimeValue timeout()
onFailure(String, Throwable). May return null to indicate no timeout is needed (default).timeout in interface ClusterStateTaskConfigpublic Priority priority()
ClusterStateTaskConfigPriority for this cluster state update task configuration.priority in interface ClusterStateTaskConfigCopyright © 2009–2016. All rights reserved.