Interface RetryProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
RetryProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:47.877Z")
@Stability(Stable)
public interface RetryProps
extends software.amazon.jsii.JsiiSerializable
Retry details.
Example:
Parallel parallel = new Parallel(this, "Do the work in parallel");
// Add branches to be executed in parallel
Pass shipItem = new Pass(this, "ShipItem");
Pass sendInvoice = new Pass(this, "SendInvoice");
Pass restock = new Pass(this, "Restock");
parallel.branch(shipItem);
parallel.branch(sendInvoice);
parallel.branch(restock);
// Retry the whole workflow if something goes wrong with exponential backoff
parallel.addRetry(RetryProps.builder()
.maxAttempts(1)
.maxDelay(Duration.seconds(5))
.jitterStrategy(JitterType.FULL)
.build());
// How to recover from errors
Pass sendFailureNotification = new Pass(this, "SendFailureNotification");
parallel.addCatch(sendFailureNotification);
// What to do in case everything succeeded
Pass closeOrder = new Pass(this, "CloseOrder");
parallel.next(closeOrder);
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forRetryPropsstatic final classAn implementation forRetryProps -
Method Summary
Modifier and TypeMethodDescriptionstatic RetryProps.Builderbuilder()default NumberMultiplication for how much longer the wait interval gets on every retry.Errors to retry.default DurationHow many seconds to wait initially before retrying.default JitterTypeIntroduces a randomization over the retry interval.default NumberHow many times to retry this particular error.default DurationMaximum limit on retry interval growth during exponential backoff.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBackoffRate
Multiplication for how much longer the wait interval gets on every retry.Default: 2
-
getErrors
Errors to retry.A list of error strings to retry, which can be either predefined errors (for example Errors.NoChoiceMatched) or a self-defined error.
Default: All errors
-
getInterval
How many seconds to wait initially before retrying.Default: Duration.seconds(1)
-
getJitterStrategy
Introduces a randomization over the retry interval.Default: - No jitter strategy
-
getMaxAttempts
How many times to retry this particular error.May be 0 to disable retry for specific errors (in case you have a catch-all retry policy).
Default: 3
-
getMaxDelay
Maximum limit on retry interval growth during exponential backoff.Default: - No max delay
-
builder
- Returns:
- a
RetryProps.BuilderofRetryProps
-