RetryOptions class

Configuration for automatic retry with exponential backoff.

Used by RetryHelper.execute to decide when and how to retry failed operations.

Constructors

RetryOptions({int maxAttempts = 3, Duration initialDelay = const Duration(seconds: 1), Duration maxDelay = const Duration(seconds: 30), double backoffMultiplier = 2.0, bool shouldRetry(OdbcError)?})
const

Properties

backoffMultiplier double
Multiplier applied to delay after each failed attempt.
final
hashCode int
The hash code for this object.
no setterinherited
initialDelay Duration
Delay before the first retry.
final
maxAttempts int
Maximum number of attempts (including the first).
final
maxDelay Duration
Upper bound for delay between retries.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldRetry bool Function(OdbcError)?
Optional custom predicate. If null, uses OdbcError.isRetryable.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

defaultOptions → const RetryOptions
Default options: 3 attempts, 1s initial delay, 2x backoff, 30s cap.