Class StepContext

java.lang.Object
software.amazon.lambda.durable.BaseContext
software.amazon.lambda.durable.StepContext
All Implemented Interfaces:
AutoCloseable

public class StepContext extends BaseContext
  • Constructor Details

    • StepContext

      protected StepContext(ExecutionManager executionManager, DurableConfig durableConfig, com.amazonaws.services.lambda.runtime.Context lambdaContext, String stepOperationId, String stepOperationName, int attempt)
      Creates a new StepContext instance for use in step operations.
      Parameters:
      executionManager - Manages durable execution state and operations
      durableConfig - Configuration for durable execution behavior
      lambdaContext - AWS Lambda runtime context
      stepOperationId - Unique identifier for this context instance that equals to step operation id
  • Method Details

    • getAttempt

      public int getAttempt()
      Returns:
      the current attempt
    • getLogger

      public DurableLogger getLogger()
      Description copied from class: BaseContext
      Gets a logger with additional information of the current execution context.
      Specified by:
      getLogger in class BaseContext
      Returns:
      a DurableLogger instance
    • close

      public void close()
      Closes the logger for this context.
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class BaseContext