DVHttpRetryPolicy class

How a host retries.

Whether a request may be retried at all is decided by its method and its idempotency key, not here: this only says how many times and how far apart.

Constructors

DVHttpRetryPolicy({int attempts = 3, Duration baseDelay = const Duration(milliseconds: 200), Duration maxDelay = const Duration(seconds: 10), bool exponential = true, bool jitter = true})
const

Properties

attempts → int
Total attempts, including the first. One means never retry.
final
baseDelay → Duration
final
exponential → bool
final
hashCode → int
The hash code for this object.
no setterinherited
jitter → bool
Randomises each wait, so a hundred clients that failed together do not all come back in the same millisecond.
final
maxDelay → Duration
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

delayFor(int retry, Random random) → Duration
How long to wait before retry number retry, counted from one.
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