RetryOptions class
Options that define how a Client will handle automatically retrying queries in the event of a retryable error.
The options are specified by RetryRule's, which define a number of times to attempt to retry a query, and a backoff function to determine how long to wait after each retry before attempting the query again. RetryOptions has a default RetryRule, and can be configured with extra RetryRule's which override the default for given error conditions.
Constructors
- RetryOptions({int? attempts, BackoffFunction? backoff})
-
Creates a new RetryOptions object, with a default RetryRule, with
the given
attemptsandbackofffunction.
Properties
- defaultRetryRule → RetryRule
-
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withRule(
{required RetryCondition condition, int? attempts, BackoffFunction? backoff}) → RetryOptions -
Adds a new RetryRule with the given
attemptsandbackofffunction, that overrides the default RetryRule for a given errorcondition.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
defaults(
) → RetryOptions - Creates a new RetryOptions with all options set to their defaults.