Interface DurableContext.MapFunction<I,O>

Type Parameters:
I - the input item type
O - 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.

@FunctionalInterface public static interface DurableContext.MapFunction<I,O>
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 Type
    Method
    Description
    apply(I item, int index, DurableContext context)
    Applies this function to the given item.
  • Method Details

    • apply

      O apply(I item, int index, DurableContext context)
      Applies this function to the given item.
      Parameters:
      item - the input item to process
      index - the zero-based index of the item in the input collection
      context - the durable context for this item's execution
      Returns:
      the result of processing the item