Record Class OperationEndInfo

java.lang.Object
java.lang.Record
software.amazon.lambda.durable.plugin.OperationEndInfo
Record Components:
id - operation ID
name - human-readable operation name (may be null)
type - operation type
subType - operation sub-type (may be null)
parentId - parent operation ID (null for root-level operations)
startTimestamp - when the operation started
endTimestamp - when the operation ended
status - the operation's terminal status (e.g., SUCCEEDED, FAILED, TIMED_OUT) — may be null for virtual ops
attempt - the total number of attempts for retriable operations (STEP, WAIT_FOR_CONDITION) — null for others
isReplay - true if this operation already existed in the execution state (completed in a prior invocation)
error - non-null if the operation failed; this component is experimental
result - the serialized result of the operation, or null if the operation failed or has no result; this component is experimental

public record OperationEndInfo(String id, String name, String type, String subType, String parentId, Instant startTimestamp, Instant endTimestamp, String status, Integer attempt, boolean isReplay, @Experimental Throwable error, @Experimental String result) extends Record
Extended operation information for operation end events.
  • Constructor Details

    • OperationEndInfo

      public OperationEndInfo(String id, String name, String type, String subType, String parentId, Instant startTimestamp, Instant endTimestamp, String status, Integer attempt, boolean isReplay, Throwable error)
      Creates operation-end information without a result.

      Retained so callers written before result was added keep compiling and linking; result resolves to null.

      Parameters:
      id - operation ID
      name - human-readable operation name (may be null)
      type - operation type
      subType - operation sub-type (may be null)
      parentId - parent operation ID (null for root-level operations)
      startTimestamp - when the operation started
      endTimestamp - when the operation ended
      status - the operation's terminal status
      attempt - the total number of attempts for retriable operations
      isReplay - true if this operation already existed in the execution state
      error - non-null if the operation failed
    • OperationEndInfo

      public OperationEndInfo(String id, String name, String type, String subType, String parentId, Instant startTimestamp, Instant endTimestamp, String status, Integer attempt, boolean isReplay, @Experimental Throwable error, @Experimental String result)
      Creates an instance of a OperationEndInfo record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      type - the value for the type record component
      subType - the value for the subType record component
      parentId - the value for the parentId record component
      startTimestamp - the value for the startTimestamp record component
      endTimestamp - the value for the endTimestamp record component
      status - the value for the status record component
      attempt - the value for the attempt record component
      isReplay - the value for the isReplay record component
      error - the value for the error record component
      result - the value for the result record component
  • Method Details

    • toString

      public String toString()
      Returns a representation that omits result.

      The generated representation would render the operation result, so plugins that log this object whole would start emitting customer payloads, potentially including secrets or personal data. Read the component explicitly to record it.

      Specified by:
      toString in class Record
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • type

      public String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • subType

      public String subType()
      Returns the value of the subType record component.
      Returns:
      the value of the subType record component
    • parentId

      public String parentId()
      Returns the value of the parentId record component.
      Returns:
      the value of the parentId record component
    • startTimestamp

      public Instant startTimestamp()
      Returns the value of the startTimestamp record component.
      Returns:
      the value of the startTimestamp record component
    • endTimestamp

      public Instant endTimestamp()
      Returns the value of the endTimestamp record component.
      Returns:
      the value of the endTimestamp record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • attempt

      public Integer attempt()
      Returns the value of the attempt record component.
      Returns:
      the value of the attempt record component
    • isReplay

      public boolean isReplay()
      Returns the value of the isReplay record component.
      Returns:
      the value of the isReplay record component
    • error

      @Experimental public Throwable error()
      Returns the value of the error record component.
      Returns:
      the value of the error record component
    • result

      @Experimental public String result()
      Returns the value of the result record component.
      Returns:
      the value of the result record component