RetryStrategy class abstract interface

Interface that encapsulates the logic for computing delays for failed actions that need to be retried.

This strategy manages the retry delay calculation with exponential backoff and jitter to avoid overwhelming the backend service with simultaneous retry attempts from multiple clients.

Implementers
Available extensions

Constructors

RetryStrategy()
Creates a RetryStrategy instance.
factory

Properties

consecutiveFailuresCount int
The number of consecutively failed retries.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getDelayAfterTheFailure() Duration

Available on RetryStrategy, provided by the RetryStrategyExtensions extension

Returns the delay for the next retry and then increments the number of consecutively failed retries.
getNextRetryDelay() Duration
Calculates and returns the delay for the next retry.
incrementConsecutiveFailures() → void
Increments the number of consecutively failed retries, making the next delay longer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetConsecutiveFailures() → void
Resets the number of consecutively failed retries, making the next delay be the shortest one.
toString() String
A string representation of this object.
inherited

Operators

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