copyWith method

ProxyRetryPolicy copyWith({
  1. int? maxRetries,
  2. Duration? initialBackoff,
  3. Duration? maxBackoff,
  4. double? backoffMultiplier,
  5. bool? useJitter,
  6. Set<Type>? retryableExceptions,
})

Creates a copy of this ProxyRetryPolicy with the given parameters

Implementation

ProxyRetryPolicy copyWith({
  int? maxRetries,
  Duration? initialBackoff,
  Duration? maxBackoff,
  double? backoffMultiplier,
  bool? useJitter,
  Set<Type>? retryableExceptions,
}) {
  return ProxyRetryPolicy(
    maxRetries: maxRetries ?? this.maxRetries,
    initialBackoff: initialBackoff ?? this.initialBackoff,
    maxBackoff: maxBackoff ?? this.maxBackoff,
    backoffMultiplier: backoffMultiplier ?? this.backoffMultiplier,
    useJitter: useJitter ?? this.useJitter,
    retryableExceptions: retryableExceptions ?? this.retryableExceptions,
  );
}