Class DurableExecutor
java.lang.Object
software.amazon.lambda.durable.execution.DurableExecutor
Orchestrates the lifecycle of a durable execution.
Handles deserialization of user input, invocation of the user handler within a DurableContext, and
production of the DurableExecutionOutput (success, failure, or pending suspension).
-
Method Summary
Modifier and TypeMethodDescriptionstatic <I,O> DurableExecutionOutput execute(DurableExecutionInput input, com.amazonaws.services.lambda.runtime.Context lambdaContext, TypeToken<I> inputType, BiFunction<I, DurableContext, O> handler, DurableConfig config) static <I,O> com.amazonaws.services.lambda.runtime.RequestHandler<DurableExecutionInput, DurableExecutionOutput> wrap(TypeToken<I> inputType, BiFunction<I, DurableContext, O> handler, DurableConfig config) Wraps a user handler in a RequestHandler that can be used by the Lambda runtime.
-
Method Details
-
execute
public static <I,O> DurableExecutionOutput execute(DurableExecutionInput input, com.amazonaws.services.lambda.runtime.Context lambdaContext, TypeToken<I> inputType, BiFunction<I, DurableContext, O> handler, DurableConfig config) -
wrap
public static <I,O> com.amazonaws.services.lambda.runtime.RequestHandler<DurableExecutionInput,DurableExecutionOutput> wrap(TypeToken<I> inputType, BiFunction<I, DurableContext, O> handler, DurableConfig config) Wraps a user handler in a RequestHandler that can be used by the Lambda runtime.- Type Parameters:
I- the type of the inputO- the type of the output- Parameters:
inputType- the type token for the inputhandler- the handler functionconfig- the durable config- Returns:
- a request handler that executes the durable function
-