Class SystemIndexMetadataUpgradeService.SystemIndexMetadataUpdateTask
java.lang.Object
org.elasticsearch.cluster.ClusterStateUpdateTask
org.elasticsearch.cluster.metadata.SystemIndexMetadataUpgradeService.SystemIndexMetadataUpdateTask
- All Implemented Interfaces:
ClusterStateTaskConfig
,ClusterStateTaskListener
- Enclosing class:
- SystemIndexMetadataUpgradeService
public class SystemIndexMetadataUpgradeService.SystemIndexMetadataUpdateTask
extends ClusterStateUpdateTask
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.ClusterStateTaskConfig
ClusterStateTaskConfig.Basic
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clusterStateProcessed
(ClusterState oldState, ClusterState newState) Called when the result of theClusterStateTaskExecutor.execute(ClusterState, List)
have been processed properly by all listeners.execute
(ClusterState currentState) Computes the cluster state that results from executing this task on the given state.void
A callback for when task execution fails.Methods inherited from class org.elasticsearch.cluster.ClusterStateUpdateTask
priority, timeout
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.ClusterStateTaskListener
onNoLongerMaster
-
Constructor Details
-
SystemIndexMetadataUpdateTask
public SystemIndexMetadataUpdateTask()
-
-
Method Details
-
execute
Description copied from class:ClusterStateUpdateTask
Computes the cluster state that results from executing this task on the given state. Returns the *same instance* if no change is required, which is an important and valuable optimisation since it short-circuits the whole publication process and saves a bunch of time and effort.- Specified by:
execute
in classClusterStateUpdateTask
- Throws:
Exception
-
onFailure
Description copied from class:ClusterStateUpdateTask
A callback for when task execution fails.Implementations of this callback should not throw exceptions: an exception thrown here is logged by the master service at
ERROR
level and otherwise ignored. If log-and-ignore is the right behaviour then implementations should do so themselves, typically using a more specific logger and at a less dramatic log level.- Specified by:
onFailure
in interfaceClusterStateTaskListener
- Specified by:
onFailure
in classClusterStateUpdateTask
-
clusterStateProcessed
Description copied from interface:ClusterStateTaskListener
Called when the result of theClusterStateTaskExecutor.execute(ClusterState, List)
have been processed properly by all listeners. Implementations of this callback must not throw exceptions: an exception thrown here is logged by the master service atERROR
level and otherwise ignored, except in tests where it raises anAssertionError
. If log-and-ignore is the right behaviour then implementations must do so themselves, typically using a more specific logger and at a less dramatic log level.
-