- All Superinterfaces:
NamedWriteable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject,Writeable
- All Known Implementing Classes:
AllocateAction,DeleteAction,DownsampleAction,ForceMergeAction,FreezeAction,MigrateAction,ReadOnlyAction,RolloverAction,SearchableSnapshotAction,SetPriorityAction,ShrinkAction,UnfollowAction,WaitForSnapshotAction
public interface LifecycleAction
extends org.elasticsearch.xcontent.ToXContentObject, NamedWriteable
Executes an action on an index related to its lifecycle.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionbooleantoSteps(Client client, String phase, Step.StepKey nextStepKey) converts theLifecycleAction's execution plan into a series ofSteps that reference each other to preserve order of operations.toSteps(Client client, String phase, Step.StepKey nextStepKey, XPackLicenseState licenseState) converts theLifecycleAction's execution plan into a series ofSteps that reference each other to preserve order of operations.Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableNameMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Method Details
-
toSteps
converts theLifecycleAction's execution plan into a series ofSteps that reference each other to preserve order of operations.- Parameters:
client- the client that will be used byAsyncActionStepandAsyncWaitStepstepsphase- the name of the phase this action is being executed withinnextStepKey- the next step to execute after this action's steps. If null, then there are no further steps to run. It is the responsibility of eachLifecycleActionto implement this correctly and not forget to link to this final step so that the policy can continue.- Returns:
- an ordered list of steps that represent the execution plan of the action
-
toSteps
default List<Step> toSteps(Client client, String phase, @Nullable Step.StepKey nextStepKey, XPackLicenseState licenseState) converts theLifecycleAction's execution plan into a series ofSteps that reference each other to preserve order of operations. This overload allows access to license state.- Parameters:
client- the client that will be used byAsyncActionStepandAsyncWaitStepstepsphase- the name of the phase this action is being executed withinnextStepKey- the next step to execute after this action's steps. If null, then there are no further steps to run. It is the responsibility of eachLifecycleActionto implement this correctly and not forget to link to this final step so that the policy can continue.licenseState- the license state to use for actions that need license checks.- Returns:
- an ordered list of steps that represent the execution plan of the action
-
isSafeAction
boolean isSafeAction()- Returns:
- true if this action is considered safe. An action is not safe if it will produce unwanted side effects or will get stuck when the action configuration is changed while an index is in this action
-