Package software.amazon.lambda.durable
Interface DurableContext.MapFunction<I,O>
- Type Parameters:
I- the input item typeO- the output result type
- Enclosing interface:
- DurableContext
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Function applied to each item in a map operation.
Each invocation receives its own DurableContext, allowing the use of durable operations like
step() and wait() within the function body. The index parameter indicates the item's position in
the input collection.
-
Method Summary
Modifier and TypeMethodDescriptionapply(I item, int index, DurableContext context) Applies this function to the given item.
-
Method Details
-
apply
Applies this function to the given item.- Parameters:
item- the input item to processindex- the zero-based index of the item in the input collectioncontext- the durable context for this item's execution- Returns:
- the result of processing the item
-