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. Step retry total duration defaults to four hours and starts when the Step is first handed to a Worker. After an attempt fails, Dex uses the duration to decide whether to schedule another retry. It does not end an attempt that is still running.

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