Class WithRetryConfig
java.lang.Object
software.amazon.lambda.durable.config.WithRetryConfig
Configuration for
DurableContext.withRetry(java.lang.String, java.util.function.BiFunction<java.lang.Integer, software.amazon.lambda.durable.DurableContext, T>).
Uses the same RetryStrategy shape that developers already know from StepConfig, so there are zero
new retry concepts to learn. If no retry strategy is specified, RetryStrategies.Presets.DEFAULT is used.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic WithRetryConfig.Builderbuilder()Creates a new builder forWithRetryConfig.Returns the retry strategy, or the default strategy if not specified.booleanReturns whether the syncwithRetryshould wrap the retry loop in a child context.
-
Method Details
-
retryStrategy
Returns the retry strategy, or the default strategy if not specified. Same type asStepConfig.retryStrategy().- Returns:
- the retry strategy, never null
-
wrapInChildContext
public boolean wrapInChildContext()Returns whether the syncwithRetryshould wrap the retry loop in a child context.When
true, the sync form behaves like the async form — all retry attempts are grouped under a single named child context in execution history. Whenfalse(the default), the retry loop runs directly on the caller's context.This setting has no effect on the async
withRetryAsyncmethods, which always wrap in a child context.- Returns:
trueif the sync retry loop should be wrapped in a child context
-
builder
Creates a new builder forWithRetryConfig.- Returns:
- a new builder instance
-