RetryConfiguration constructor

RetryConfiguration({
  1. required List<Exception> retryableExceptions,
  2. int maxAttempt = 5,
  3. Duration? backOff,
  4. dynamic onRecover(
    1. 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,
    );