Class DurableExecutor

java.lang.Object
software.amazon.lambda.durable.execution.DurableExecutor

public class DurableExecutor extends Object
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 Details

    • supportsSameThreadInvocationHooks

      public static boolean supportsSameThreadInvocationHooks()
      Returns whether this core runs invocation start/end hooks on the root handler thread and awaits handler cleanup and end-hook completion before returning. Plugins that retain thread-local scopes may require this capability before construction.
    • 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 input
      O - the type of the output
      Parameters:
      inputType - the type token for the input
      handler - the handler function
      config - the durable config
      Returns:
      a request handler that executes the durable function