Interface BaseContext
- All Known Subinterfaces:
DurableContext,StepContext
- All Known Implementing Classes:
BaseContextImpl,DurableContextImpl,StepContextImpl
public interface BaseContext
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGets the context ID for this context.Gets the context name for this context.static BaseContextGets the current context (DurableContext or StepContext) for this thread.Returns the configuration for durable execution behavior.Returns the current durable execution arncom.amazonaws.services.lambda.runtime.ContextReturns the AWS Lambda runtime context.Gets a logger with additional information of the current execution context.getLogger(org.slf4j.Logger delegate) Gets a logger with additional information of the current execution context.booleanReturns whether this context is currently in replay mode.
-
Field Details
-
CONTEXT
-
-
Method Details
-
getCurrentContext
Gets the current context (DurableContext or StepContext) for this thread.- Returns:
- the current context or null if not set
-
getLogger
DurableLogger getLogger()Gets a logger with additional information of the current execution context.- Returns:
- a DurableLogger instance
-
getLogger
Gets a logger with additional information of the current execution context.- Parameters:
delegate- the logger to wrap- Returns:
- a DurableLogger instance
-
getLambdaContext
com.amazonaws.services.lambda.runtime.Context getLambdaContext()Returns the AWS Lambda runtime context.- Returns:
- the Lambda context
-
getExecutionArn
String getExecutionArn()Returns the current durable execution arn- Returns:
- the execution arn
-
getDurableConfig
DurableConfig getDurableConfig()Returns the configuration for durable execution behavior.- Returns:
- the durable configuration
-
getContextId
String getContextId()Gets the context ID for this context. Null for root context, operationId of the context operation for child contexts. -
getContextName
String getContextName()Gets the context name for this context. Null for root context. -
isReplaying
boolean isReplaying()Returns whether this context is currently in replay mode.
-