RetryConfiguration constructor
RetryConfiguration({
- required List<
Exception> retryableExceptions, - int maxAttempt = 5,
- Duration? backOff,
- dynamic onRecover(
- ExecutionContext context
Returns the new instance of SkipConfiguration.
Implementation
factory RetryConfiguration({
required List<Exception> retryableExceptions,
int maxAttempt = 5,
Duration? backOff,
Function(ExecutionContext context)? onRecover,
}) =>
_RetryConfiguration(
//! The "is" modifier, which allows reference up to the parent of the target object,
//! is preferred for type determination, but the right side of the "is" modifier cannot be
//! a variable due to the Dart language specification. Therefore, type determination is currently
//! performed by comparing strings.
retryableExceptions: retryableExceptions
.map((exception) => exception.runtimeType.toString())
.toList(),
maxAttempt: maxAttempt,
backOff: backOff,
onRecover: onRecover,
);