Record Class InvocationInfo
java.lang.Object
java.lang.Record
software.amazon.lambda.durable.plugin.InvocationInfo
- Record Components:
requestId- the Lambda request ID for this invocationdurableExecutionArn- the durable execution ARNisFirstInvocation- true if this is the first invocation of the execution (not a replay invocation)executionStartTime- the start timestamp of the durable execution, taken from the initial EXECUTION operation in the first event delivered by the backend. Never null and stable across all invocations of the same execution.executionInput- the deserialized execution input passed to the user handler, or null when no plugins are registered or the input could not be deserialized; this component is experimental
public record InvocationInfo(String requestId, String durableExecutionArn, boolean isFirstInvocation, Instant executionStartTime, @Experimental Object executionInput)
extends Record
Invocation-level information available to plugin hooks.
-
Constructor Summary
ConstructorsConstructorDescriptionInvocationInfo(String requestId, String durableExecutionArn, boolean isFirstInvocation, Instant executionStartTime) Creates invocation information without an execution input.InvocationInfo(String requestId, String durableExecutionArn, boolean isFirstInvocation, Instant executionStartTime, Object executionInput) Creates an instance of aInvocationInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedurableExecutionArnrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexecutionInputrecord component.Returns the value of theexecutionStartTimerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisFirstInvocationrecord component.Returns the value of therequestIdrecord component.toString()Returns a representation that omitsexecutionInput.
-
Constructor Details
-
InvocationInfo
public InvocationInfo(String requestId, String durableExecutionArn, boolean isFirstInvocation, Instant executionStartTime, @Experimental Object executionInput) Creates an instance of aInvocationInforecord class.- Parameters:
requestId- the value for therequestIdrecord componentdurableExecutionArn- the value for thedurableExecutionArnrecord componentisFirstInvocation- the value for theisFirstInvocationrecord componentexecutionStartTime- the value for theexecutionStartTimerecord componentexecutionInput- the value for theexecutionInputrecord component
-
InvocationInfo
public InvocationInfo(String requestId, String durableExecutionArn, boolean isFirstInvocation, Instant executionStartTime) Creates invocation information without an execution input.Retained so callers written before
executionInputwas added keep compiling;executionInputresolves to null.- Parameters:
requestId- the Lambda request ID for this invocationdurableExecutionArn- the durable execution ARNisFirstInvocation- true if this is the first invocation of the executionexecutionStartTime- the start timestamp of the durable execution- Throws:
NullPointerException- ifexecutionStartTimeis null
-
-
Method Details
-
toString
Returns a representation that omitsexecutionInput.The generated representation would render the execution input, 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.
-
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
requestId
Returns the value of therequestIdrecord component.- Returns:
- the value of the
requestIdrecord component
-
durableExecutionArn
Returns the value of thedurableExecutionArnrecord component.- Returns:
- the value of the
durableExecutionArnrecord component
-
isFirstInvocation
public boolean isFirstInvocation()Returns the value of theisFirstInvocationrecord component.- Returns:
- the value of the
isFirstInvocationrecord component
-
executionStartTime
Returns the value of theexecutionStartTimerecord component.- Returns:
- the value of the
executionStartTimerecord component
-
executionInput
Returns the value of theexecutionInputrecord component.- Returns:
- the value of the
executionInputrecord component
-