@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:43.496Z")
public interface RetryProps
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 parallel.addRetry(RetryProps.builder().maxAttempts(1).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);
Modifier and Type | Interface and Description |
---|---|
static class |
RetryProps.Builder
A builder for
RetryProps |
static class |
RetryProps.Jsii$Proxy
An implementation for
RetryProps |
Modifier and Type | Method and Description |
---|---|
static RetryProps.Builder |
builder() |
default java.lang.Number |
getBackoffRate()
Multiplication for how much longer the wait interval gets on every retry.
|
default java.util.List<java.lang.String> |
getErrors()
Errors to retry.
|
default Duration |
getInterval()
How many seconds to wait initially before retrying.
|
default java.lang.Number |
getMaxAttempts()
How many times to retry this particular error.
|
default java.lang.Number getBackoffRate()
Default: 2
default java.util.List<java.lang.String> getErrors()
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
default Duration getInterval()
Default: Duration.seconds(1)
default java.lang.Number getMaxAttempts()
May be 0 to disable retry for specific errors (in case you have a catch-all retry policy).
Default: 3
static RetryProps.Builder builder()
RetryProps.Builder
of RetryProps