RetryExecutor class

Handles retry logic for workflow steps based on RetryPolicy.

Calculates backoff delays and determines whether a step should be retried. Supports fixed-interval and exponential backoff with optional jitter.

Constructors

RetryExecutor({Random? random})
Creates a RetryExecutor.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

calculateDelay(RetryPolicy policy, int attempt) Duration
Calculates the delay before the next retry attempt.
executeWithRetry<T>(RetryPolicy policy, Future<T> action(), {void onAttempt(int attempt)?, FutureOr<void> onRetry(int attempt, Object error)?, Future<void> delayFn(Duration delay)?}) Future<T>
Executes action with retry logic according to policy.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRetry(RetryPolicy policy, int attempt) bool
Returns true if the step should be retried given the current attempt.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited