Class StepOptions

java.lang.Object
io.superdurable.dex.StepOptions

public final class StepOptions extends Object
Configures timeout, retry, durability, locking, and failure behavior for a Step.

Return an instance from Step.getStepOptions() to configure every execution, or attach one to a StepMovement for a single transition. Wait-for and execute settings are independent. Durations describe method timeouts, not the potentially much longer time spent waiting for durable timer or Channel conditions.

public StepOptions getStepOptions() {
    return StepOptions.newBuilder()
            .waitForMethodTimeout(Duration.ofSeconds(5))
            .executeMethodTimeout(Duration.ofSeconds(30))
            .executeRetry(RetryPolicy.newBuilder().maximumAttempts(3).build())
            .addExecuteLock(AttributeLock.of(balance))
            .build();
}
  • Method Details

    • newBuilder

      public static StepOptions.Builder newBuilder()
      Creates a builder initialized with Dex defaults.
      Returns:
      a new mutable builder