Record Class MapResult.MapResultItem<T>
java.lang.Object
java.lang.Record
software.amazon.lambda.durable.model.MapResult.MapResultItem<T>
- Type Parameters:
T- the result type- Record Components:
status- the status of this itemresult- the result value, or null if failed/not startederror- the error details, or null if succeeded/not started
public static record MapResult.MapResultItem<T>(MapResult.MapResultItem.Status status, T result, MapResult.MapError error)
extends Record
Represents the outcome of a single item in a map operation.
Each item either succeeds with a result, fails with an error, or was never started. The status field indicates which case applies.
Errors are stored as MapResult.MapError (plain strings) rather than raw Throwable, so they survive serialization
across checkpoint-and-replay cycles without requiring AWS SDK-specific Jackson modules.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStatus of an individual map item. -
Constructor Summary
ConstructorsConstructorDescriptionMapResultItem(MapResult.MapResultItem.Status status, T result, MapResult.MapError error) Creates an instance of aMapResultItemrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.static <T> MapResult.MapResultItem<T>failed(MapResult.MapError error) Creates a failed result item.final inthashCode()Returns a hash code value for this object.result()Returns the value of theresultrecord component.static <T> MapResult.MapResultItem<T>skipped()Creates a skipped result item.status()Returns the value of thestatusrecord component.static <T> MapResult.MapResultItem<T>succeeded(T result) Creates a successful result item.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
succeeded
Creates a successful result item. -
failed
Creates a failed result item. -
skipped
Creates a skipped result item. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-