Class RetryPolicy

java.lang.Object
io.superdurable.dex.RetryPolicy

public final class RetryPolicy extends Object
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();
  • Method Details

    • newBuilder

      public static RetryPolicy.Builder newBuilder()
      Creates a builder whose unset values use server defaults.
      Returns:
      a new mutable builder