Package org.elasticsearch.discovery.zen
Class ZenDiscovery.NodeRemovalClusterStateTaskExecutor
- java.lang.Object
-
- org.elasticsearch.discovery.zen.ZenDiscovery.NodeRemovalClusterStateTaskExecutor
-
- All Implemented Interfaces:
ClusterStateTaskExecutor<ZenDiscovery.NodeRemovalClusterStateTaskExecutor.Task>,ClusterStateTaskListener
- Enclosing class:
- ZenDiscovery
public static class ZenDiscovery.NodeRemovalClusterStateTaskExecutor extends java.lang.Object implements ClusterStateTaskExecutor<ZenDiscovery.NodeRemovalClusterStateTaskExecutor.Task>, ClusterStateTaskListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classZenDiscovery.NodeRemovalClusterStateTaskExecutor.Task-
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.ClusterStateTaskExecutor
ClusterStateTaskExecutor.ClusterTasksResult<T>, ClusterStateTaskExecutor.TaskResult
-
-
Constructor Summary
Constructors Constructor Description NodeRemovalClusterStateTaskExecutor(AllocationService allocationService, ElectMasterService electMasterService, java.util.function.Consumer<java.lang.String> rejoin, org.apache.logging.log4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClusterStateTaskExecutor.ClusterTasksResult<ZenDiscovery.NodeRemovalClusterStateTaskExecutor.Task>execute(ClusterState currentState, java.util.List<ZenDiscovery.NodeRemovalClusterStateTaskExecutor.Task> tasks)Update the cluster state based on the current state and the given tasks.voidonFailure(java.lang.String source, java.lang.Exception e)A callback called when execute fails.voidonNoLongerMaster(java.lang.String source)called when the task was rejected because the local node is no longer master.-
Methods inherited from interface org.elasticsearch.cluster.ClusterStateTaskExecutor
clusterStatePublished, describeTasks, runOnlyOnMaster
-
Methods inherited from interface org.elasticsearch.cluster.ClusterStateTaskListener
clusterStateProcessed
-
-
-
-
Constructor Detail
-
NodeRemovalClusterStateTaskExecutor
public NodeRemovalClusterStateTaskExecutor(AllocationService allocationService, ElectMasterService electMasterService, java.util.function.Consumer<java.lang.String> rejoin, org.apache.logging.log4j.Logger logger)
-
-
Method Detail
-
execute
public ClusterStateTaskExecutor.ClusterTasksResult<ZenDiscovery.NodeRemovalClusterStateTaskExecutor.Task> execute(ClusterState currentState, java.util.List<ZenDiscovery.NodeRemovalClusterStateTaskExecutor.Task> tasks) throws java.lang.Exception
Description copied from interface:ClusterStateTaskExecutorUpdate the cluster state based on the current state and the given tasks. Return the *same instance* if no state should be changed.- Specified by:
executein interfaceClusterStateTaskExecutor<ZenDiscovery.NodeRemovalClusterStateTaskExecutor.Task>- Throws:
java.lang.Exception
-
onFailure
public void onFailure(java.lang.String source, java.lang.Exception e)Description copied from interface:ClusterStateTaskListenerA callback called when execute fails.- Specified by:
onFailurein interfaceClusterStateTaskListener
-
onNoLongerMaster
public void onNoLongerMaster(java.lang.String source)
Description copied from interface:ClusterStateTaskListenercalled when the task was rejected because the local node is no longer master. Used only for tasks submitted toMasterService.- Specified by:
onNoLongerMasterin interfaceClusterStateTaskListener
-
-