Class StepOptions
java.lang.Object
io.superdurable.dex.StepOptions
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();
}
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic StepOptions.BuilderCreates a builder initialized with Dex defaults.
-
Method Details
-
newBuilder
Creates a builder initialized with Dex defaults.- Returns:
- a new mutable builder
-