Record Class LifecycleExecutionState

java.lang.Object
java.lang.Record
org.elasticsearch.cluster.metadata.LifecycleExecutionState

public record LifecycleExecutionState(String phase, String action, String step, String failedStep, Boolean isAutoRetryableError, Integer failedStepRetryCount, String stepInfo, String phaseDefinition, Long lifecycleDate, Long phaseTime, Long actionTime, Long stepTime, String snapshotRepository, String snapshotName, String shrinkIndexName, String snapshotIndexName, String rollupIndexName) extends Record
Contains information about the execution of a lifecycle policy for a single index, and serializes/deserializes this information to and from custom index metadata.
  • Field Details

  • Constructor Details

    • LifecycleExecutionState

      public LifecycleExecutionState(String phase, String action, String step, String failedStep, Boolean isAutoRetryableError, Integer failedStepRetryCount, String stepInfo, String phaseDefinition, Long lifecycleDate, Long phaseTime, Long actionTime, Long stepTime, String snapshotRepository, String snapshotName, String shrinkIndexName, String snapshotIndexName, String rollupIndexName)
      Creates an instance of a LifecycleExecutionState record class.
      Parameters:
      phase - the value for the phase record component
      action - the value for the action record component
      step - the value for the step record component
      failedStep - the value for the failedStep record component
      isAutoRetryableError - the value for the isAutoRetryableError record component
      failedStepRetryCount - the value for the failedStepRetryCount record component
      stepInfo - the value for the stepInfo record component
      phaseDefinition - the value for the phaseDefinition record component
      lifecycleDate - the value for the lifecycleDate record component
      phaseTime - the value for the phaseTime record component
      actionTime - the value for the actionTime record component
      stepTime - the value for the stepTime record component
      snapshotRepository - the value for the snapshotRepository record component
      snapshotName - the value for the snapshotName record component
      shrinkIndexName - the value for the shrinkIndexName record component
      snapshotIndexName - the value for the snapshotIndexName record component
      rollupIndexName - the value for the rollupIndexName record component
  • Method Details

    • builder

      public static LifecycleExecutionState.Builder builder()
    • builder

    • fromCustomMetadata

      public static LifecycleExecutionState fromCustomMetadata(Map<String,String> customData)
    • asMap

      public Map<String,String> asMap()
      Converts this object to an immutable map representation for use with IndexMetadata.Builder.putCustom(String, Map).
      Returns:
      An immutable Map representation of this execution state.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • phase

      public String phase()
      Returns the value of the phase record component.
      Returns:
      the value of the phase record component
    • action

      public String action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • step

      public String step()
      Returns the value of the step record component.
      Returns:
      the value of the step record component
    • failedStep

      public String failedStep()
      Returns the value of the failedStep record component.
      Returns:
      the value of the failedStep record component
    • isAutoRetryableError

      public Boolean isAutoRetryableError()
      Returns the value of the isAutoRetryableError record component.
      Returns:
      the value of the isAutoRetryableError record component
    • failedStepRetryCount

      public Integer failedStepRetryCount()
      Returns the value of the failedStepRetryCount record component.
      Returns:
      the value of the failedStepRetryCount record component
    • stepInfo

      public String stepInfo()
      Returns the value of the stepInfo record component.
      Returns:
      the value of the stepInfo record component
    • phaseDefinition

      public String phaseDefinition()
      Returns the value of the phaseDefinition record component.
      Returns:
      the value of the phaseDefinition record component
    • lifecycleDate

      public Long lifecycleDate()
      Returns the value of the lifecycleDate record component.
      Returns:
      the value of the lifecycleDate record component
    • phaseTime

      public Long phaseTime()
      Returns the value of the phaseTime record component.
      Returns:
      the value of the phaseTime record component
    • actionTime

      public Long actionTime()
      Returns the value of the actionTime record component.
      Returns:
      the value of the actionTime record component
    • stepTime

      public Long stepTime()
      Returns the value of the stepTime record component.
      Returns:
      the value of the stepTime record component
    • snapshotRepository

      public String snapshotRepository()
      Returns the value of the snapshotRepository record component.
      Returns:
      the value of the snapshotRepository record component
    • snapshotName

      public String snapshotName()
      Returns the value of the snapshotName record component.
      Returns:
      the value of the snapshotName record component
    • shrinkIndexName

      public String shrinkIndexName()
      Returns the value of the shrinkIndexName record component.
      Returns:
      the value of the shrinkIndexName record component
    • snapshotIndexName

      public String snapshotIndexName()
      Returns the value of the snapshotIndexName record component.
      Returns:
      the value of the snapshotIndexName record component
    • rollupIndexName

      public String rollupIndexName()
      Returns the value of the rollupIndexName record component.
      Returns:
      the value of the rollupIndexName record component