object retry extends Retry

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. retry
  2. Retry
  3. LazyLogger
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def directly[F[_], A](maxRetries: Int = 5)(ioa: F[A])(implicit F: ApplicativeError[F, Throwable]): F[A]

    If your IO carries an error, retry.

    If your IO carries an error, retry. If you want to have retry based a bad status, ensure your IO has converted the desired statuses to an effect failure first (see ensureSeccussfulStatus).

    Definition Classes
    Retry
  2. def getMessage(t: Throwable, fallback: String = "no message"): String

    Extract a message from t via "getMessage" or the underlying "cause" exception.

    Extract a message from t via "getMessage" or the underlying "cause" exception. Use fallback if neither of those found.

    Definition Classes
    Retry
  3. lazy val logger: Logger
    Definition Classes
    LazyLogger
  4. def makeSomeStatusesErrors[F[_]](isError: (Status) ⇒ Boolean = shouldRetry)(implicit F: ApplicativeError[F, Throwable]): Kleisli[F, DisposableResponse[F], DisposableResponse[F]]

    Convert an effect containing a DisposableResponse, if it fails predictate, to an F UnexpectedStatus error.

    Convert an effect containing a DisposableResponse, if it fails predictate, to an F UnexpectedStatus error. Otherwise leave it untouched. Success is defined by the predicate. If you have a Kleisli[F,?,DisposableResponse] you can obtain a Kleisli[F,?,DisposableResponse] using k1 andThen k2 and ensure your effect carries a failure if the status does not satisfy predicate. Callers can use this function if they are not sure that an effect carrying a DisposableResponse has converted the effect to contain an error for specific status codes.

    Definition Classes
    Retry
  5. def retryIfRetryableThrowables[F[_], A](policy: (F[A]) ⇒ F[A], isRetryableStatus: (Status) ⇒ Boolean = shouldRetry)(implicit F: ApplicativeError[F, Throwable]): (F[A]) ⇒ F[A]

    Create a retry policy that retries on CommunicationFailure, DecodeFailure or UnexpectedStatus (if isRetryableStatus(status) is true) failures.

    Create a retry policy that retries on CommunicationFailure, DecodeFailure or UnexpectedStatus (if isRetryableStatus(status) is true) failures.

    policy

    The retry policy called if failure is detected.

    Definition Classes
    Retry
  6. def shouldRetry(s: Status): Boolean

    Return true if the status *suggests* that the request should be retried.

    Return true if the status *suggests* that the request should be retried. The statuses include: InternalServerError, ServiceUnavailable, BadGateway, GatewayTimeout, TooManyRequests which is a good starting point for dynamics.

    Definition Classes
    Retry
  7. def withBackoff[F[_], A](initialDelay: FiniteDuration = 5.seconds, maxRetries: Int = 5)(ioa: F[A])(implicit F: ApplicativeError[F, Throwable], timer: Timer[F]): F[A]

    If your F carries an error, retry.

    If your F carries an error, retry. If you want to have retry based a bad status, ensure your IO has converted the desired statuses to an effect failure first (see ensureSeccussfulStatus).

    Definition Classes
    Retry
  8. def withPause[F[_], A](delayBetween: FiniteDuration = 5.seconds, maxRetries: Int = 5)(ioa: F[A])(implicit F: ApplicativeError[F, Throwable], timer: Timer[F]): F[A]

    If your IO carries an error, retry.

    If your IO carries an error, retry. If you want to have retry based a bad status, ensure your IO has converted the desired statuses to an effect failure first (see ensureSeccussfulStatus).

    Definition Classes
    Retry