Module org.elasticsearch.xcore
Package org.elasticsearch.xpack.core.ilm
Class SwapAliasesAndDeleteSourceIndexStep
java.lang.Object
org.elasticsearch.xpack.core.ilm.Step
org.elasticsearch.xpack.core.ilm.AsyncActionStep
org.elasticsearch.xpack.core.ilm.SwapAliasesAndDeleteSourceIndexStep
This step swaps all the aliases from the source index to the restored index and deletes the source index. This is useful in scenarios
following a restore from snapshot operation where the restored index will take the place of the source index in the ILM lifecycle.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.core.ilm.Step
Step.StepKey -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSwapAliasesAndDeleteSourceIndexStep(Step.StepKey key, Step.StepKey nextStepKey, Client client, String targetIndexPrefix) SwapAliasesAndDeleteSourceIndexStep(Step.StepKey key, Step.StepKey nextStepKey, Client client, BiFunction<String, LifecycleExecutionState, String> targetIndexNameSupplier, boolean createSourceIndexAlias) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanbooleanIndicates if the step can be automatically retried when it encounters an execution error.voidperformAction(IndexMetadata indexMetadata, ClusterState currentClusterState, ClusterStateObserver observer, ActionListener<Void> listener) Methods inherited from class org.elasticsearch.xpack.core.ilm.AsyncActionStep
getClientMethods inherited from class org.elasticsearch.xpack.core.ilm.Step
getCurrentStepKey, getKey, getNextStepKey, toString
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
SwapAliasesAndDeleteSourceIndexStep
public SwapAliasesAndDeleteSourceIndexStep(Step.StepKey key, Step.StepKey nextStepKey, Client client, String targetIndexPrefix) -
SwapAliasesAndDeleteSourceIndexStep
public SwapAliasesAndDeleteSourceIndexStep(Step.StepKey key, Step.StepKey nextStepKey, Client client, BiFunction<String, LifecycleExecutionState, String> targetIndexNameSupplier, boolean createSourceIndexAlias)
-
-
Method Details
-
isRetryable
public boolean isRetryable()Description copied from class:StepIndicates if the step can be automatically retried when it encounters an execution error.- Specified by:
isRetryablein classStep
-
performAction
public void performAction(IndexMetadata indexMetadata, ClusterState currentClusterState, ClusterStateObserver observer, ActionListener<Void> listener) - Specified by:
performActionin classAsyncActionStep
-
indexSurvives
public boolean indexSurvives()- Overrides:
indexSurvivesin classAsyncActionStep
-
hashCode
public int hashCode() -
equals
-