WorkflowRetryPolicy class final

Serializable retry policy for one logical checkpoint or compensation.

maxAttempts includes the first attempt. Queue delivery counts do not reset this budget. Jitter and executable retry predicates are not persisted.

Constructors

WorkflowRetryPolicy({int maxAttempts = 1, Duration delay = Duration.zero, double multiplier = 1, Duration maxDelay = const Duration(minutes: 5)})
Creates fixed delays when multiplier is one, exponential otherwise.
const
WorkflowRetryPolicy.fromJson(Map<String, Object?> json)
Rejects malformed or invalid persisted policies.
factory

Properties

delay → Duration
Delay after the first failed attempt.
final
hashCode → int
The hash code for this object.
no setterinherited
maxAttempts → int
Total allowed attempts, including abandoned attempts after a crash.
final
maxDelay → Duration
Upper bound for every retry delay.
final
multiplier → double
Exponential multiplier, at least one.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

delayAfter(int attempt) → Duration
Returns a bounded delay after the one-based failed attempt.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Encodes without losing sub-millisecond precision.
toString() → String
A string representation of this object.
inherited
validate() → void
Validates in release builds as well as debug builds.

Operators

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