RetryPolicy<T> class
abstract
Policy for handling retries of failed requests.
- Implementers
Constructors
- RetryPolicy({required int? maxRetries, Duration? maxWait})
-
Policy for handling retries of failed requests.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxRetries → int?
-
Global maximum number of retries to attempt for any operation before
abandoning the effort.
final
- maxWait → Duration?
-
If non-null, caps the wait time for an Operation's exponential backoff
retry.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> - Releases all resources.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onReconnected(
) → Future< List< Operation< >T> > - Called by the SourceList when connectivity is reestablished. Should return all operations which failed due to connectivity issues, but not any operations which failed due to server errors, as exponential backoff will decide when they are retried.
-
onRetryOperation(
) → Stream< Operation< T> > - Stream of Operation<T>s whose time to retry has come.
-
shouldRetry(
Operation< T> operation, FailureReason reason) → bool - Determines whether an operation should be retried.
-
storeOperationForRetry(
Operation< T> operation, FailureReason reason) → Future<void> - Triages a failed operation for possible retry.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited