Package software.amazon.lambda.durable
Class StepContext
java.lang.Object
software.amazon.lambda.durable.BaseContext
software.amazon.lambda.durable.StepContext
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStepContext(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the logger for this context.intGets a logger with additional information of the current execution context.Methods inherited from class software.amazon.lambda.durable.BaseContext
getContextId, getContextName, getDurableConfig, getExecutionContext, getExecutionManager, getLambdaContext
-
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 operationsdurableConfig- Configuration for durable execution behaviorlambdaContext- AWS Lambda runtime contextstepOperationId- Unique identifier for this context instance that equals to step operation id
-
-
Method Details
-
getAttempt
public int getAttempt()- Returns:
- the current attempt
-
getLogger
Description copied from class:BaseContextGets a logger with additional information of the current execution context.- Specified by:
getLoggerin classBaseContext- Returns:
- a DurableLogger instance
-
close
public void close()Closes the logger for this context.- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classBaseContext
-