Interface LifecycleAction

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.Params

    Nested 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 Type
    Method
    Description
    boolean
     
    toSteps(Client client, String phase, Step.StepKey nextStepKey)
    converts the LifecycleAction's execution plan into a series of Steps that reference each other to preserve order of operations.
    default List<Step>
    toSteps(Client client, String phase, Step.StepKey nextStepKey, XPackLicenseState licenseState)
    converts the LifecycleAction's execution plan into a series of Steps that reference each other to preserve order of operations.

    Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable

    getWriteableName

    Methods inherited from interface org.elasticsearch.xcontent.ToXContent

    toXContent

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject

    isFragment

    Methods inherited from interface org.elasticsearch.common.io.stream.Writeable

    writeTo
  • Method Details

    • toSteps

      List<Step> toSteps(Client client, String phase, @Nullable Step.StepKey nextStepKey)
      converts the LifecycleAction's execution plan into a series of Steps that reference each other to preserve order of operations.
      Parameters:
      client - the client that will be used by AsyncActionStep and AsyncWaitStep steps
      phase - the name of the phase this action is being executed within
      nextStepKey - 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 each LifecycleAction to 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 the LifecycleAction's execution plan into a series of Steps that reference each other to preserve order of operations. This overload allows access to license state.
      Parameters:
      client - the client that will be used by AsyncActionStep and AsyncWaitStep steps
      phase - the name of the phase this action is being executed within
      nextStepKey - 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 each LifecycleAction to 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