java.lang.Object
org.elasticsearch.xpack.core.ilm.Step
org.elasticsearch.xpack.core.ilm.ClusterStateActionStep
org.elasticsearch.xpack.core.ilm.BranchingStep
This step changes its
getNextStepKey() depending on the
outcome of a defined predicate. It performs no changes to the
cluster state.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.core.ilm.Step
Step.StepKey -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBranchingStep(Step.StepKey key, Step.StepKey nextStepKeyOnFalse, Step.StepKey nextStepKeyOnTrue, BiPredicate<Index, ClusterState> predicate) BranchingStepis a step whose next step is based on the return value of a specific predicate. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal Step.StepKeyThis method returns the next step to execute based on the predicate.final BiPredicate<Index, ClusterState> inthashCode()booleanIndicates if the step can be automatically retried when it encounters an execution error.performAction(Index index, ClusterState clusterState) Methods inherited from class org.elasticsearch.xpack.core.ilm.ClusterStateActionStep
indexForAsyncInvocationMethods inherited from class org.elasticsearch.xpack.core.ilm.Step
getCurrentStepKey, getKey, toString
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
BranchingStep
public BranchingStep(Step.StepKey key, Step.StepKey nextStepKeyOnFalse, Step.StepKey nextStepKeyOnTrue, BiPredicate<Index, ClusterState> predicate) BranchingStepis a step whose next step is based on the return value of a specific predicate.- Parameters:
key- the step's keynextStepKeyOnFalse- the key of the step to run if predicate returns falsenextStepKeyOnTrue- the key of the step to run if predicate returns truepredicate- the condition to check when deciding which step to run next
-
-
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
- Specified by:
performActionin classClusterStateActionStep
-
getNextStepKey
This method returns the next step to execute based on the predicate. If the predicate returned true, then nextStepKeyOnTrue is the key of the next step to run, otherwise nextStepKeyOnFalse is.throws
UnsupportedOperationExceptionif performAction was not called yet- Overrides:
getNextStepKeyin classStep- Returns:
- next step to execute
-
getPredicate
-
equals
-
hashCode
public int hashCode()
-