RetryContext<E extends Object> class final

Information available when a typed failure asks a RetryPolicy whether another attempt should run.

attempt is the attempt that just failed and starts at one. Therefore a policy with maxAttempts: 3 may schedule work after failures from attempts one and two, but returns null after attempt three.

Constructors

RetryContext({required int attempt, required E error, required double nextRandom()})

Properties

attempt int
One-based number of the attempt that produced error.
final
error → E
Typed failure produced by the attempt.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

nextRandom() double
Obtain one uniform random value in [0, 1).
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