Class RetryPolicy
java.lang.Object
io.superdurable.dex.RetryPolicy
Configures exponential-backoff retries for Flow or Step operations.
Only values supplied to the builder override server defaults. An operation stops retrying when
either its maximum attempts or total duration limit is reached. Durations use
Duration; the receiving API determines whether subsecond precision is accepted.
With asynchronous Step durability, local and regular execution share the same attempt and elapsed
duration budgets. Fallback starts immediately, while later regular retries continue the cumulative
exponential-backoff sequence. Step retry total duration defaults to four hours. The asynchronous
local phase uses at most seven seconds and three attempts before fallback; smaller user limits
still apply.
RetryPolicy retry = RetryPolicy.newBuilder()
.initialInterval(Duration.ofSeconds(1))
.backoffCoefficient(2.0)
.maximumInterval(Duration.ofSeconds(30))
.maximumAttempts(5)
.build();
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic RetryPolicy.BuilderCreates a builder whose unset values use server defaults.
-
Method Details
-
newBuilder
Creates a builder whose unset values use server defaults.- Returns:
- a new mutable builder
-