Package org.elasticsearch.discovery.zen
Class NodeJoinController.JoinTaskExecutor
- java.lang.Object
-
- org.elasticsearch.discovery.zen.NodeJoinController.JoinTaskExecutor
-
- All Implemented Interfaces:
ClusterStateTaskExecutor<DiscoveryNode>
- Enclosing class:
- NodeJoinController
public static class NodeJoinController.JoinTaskExecutor extends java.lang.Object implements ClusterStateTaskExecutor<DiscoveryNode>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.ClusterStateTaskExecutor
ClusterStateTaskExecutor.ClusterTasksResult<T>, ClusterStateTaskExecutor.TaskResult
-
-
Constructor Summary
Constructors Constructor Description JoinTaskExecutor(Settings settings, AllocationService allocationService, ElectMasterService electMasterService, org.apache.logging.log4j.Logger logger)
-
Method Summary
Modifier and Type Method Description void
clusterStatePublished(ClusterChangedEvent event)
Callback invoked after new cluster state is published.ClusterStateTaskExecutor.ClusterTasksResult<DiscoveryNode>
execute(ClusterState currentState, java.util.List<DiscoveryNode> joiningNodes)
Update the cluster state based on the current state and the given tasks.boolean
runOnlyOnMaster()
indicates whether this executor should only run if the current node is master-
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
-
-
-
-
Constructor Detail
-
JoinTaskExecutor
public JoinTaskExecutor(Settings settings, AllocationService allocationService, ElectMasterService electMasterService, org.apache.logging.log4j.Logger logger)
-
-
Method Detail
-
execute
public ClusterStateTaskExecutor.ClusterTasksResult<DiscoveryNode> execute(ClusterState currentState, java.util.List<DiscoveryNode> joiningNodes) throws java.lang.Exception
Description copied from interface:ClusterStateTaskExecutor
Update the cluster state based on the current state and the given tasks. Return the *same instance* if no state should be changed.- Specified by:
execute
in interfaceClusterStateTaskExecutor<DiscoveryNode>
- Throws:
java.lang.Exception
-
runOnlyOnMaster
public boolean runOnlyOnMaster()
Description copied from interface:ClusterStateTaskExecutor
indicates whether this executor should only run if the current node is master- Specified by:
runOnlyOnMaster
in interfaceClusterStateTaskExecutor<DiscoveryNode>
-
clusterStatePublished
public void clusterStatePublished(ClusterChangedEvent event)
Description copied from interface:ClusterStateTaskExecutor
Callback invoked after new cluster state is published. Note that this method is not invoked if the cluster state was not updated. Note that this method will be executed using system context.- Specified by:
clusterStatePublished
in interfaceClusterStateTaskExecutor<DiscoveryNode>
- Parameters:
event
- the change event for this cluster state change, containing both old and new states
-
-