PureharmTimedAttemptReattemptSyntaxOps

final class PureharmTimedAttemptReattemptSyntaxOps[F[_], A](val fa: F[A]) extends AnyVal
Companion
object
class AnyVal
trait Matchable
class Any

Value members

Deprecated methods

@deprecated("Use .retryingOnAllErrors(...).attempt. N.B there exists more retry methods now, where you can specify which errors to recover from. See cats-retry documentation", "0.5.0")
def reattempt(errorLog: (Throwable, String) => F[Unit])(retries: Int, betweenRetries: FiniteDuration)(implicit F: Temporal[F]): F[A]

Runs an effect F[A] a maximum of retries time, until it is not failed. Between each retry it waits betweenRetries. It also measures the time elapsed in total.

Runs an effect F[A] a maximum of retries time, until it is not failed. Between each retry it waits betweenRetries. It also measures the time elapsed in total.

Value Params
errorLog

Use this to specify how to log any error that happens within your fa, and any error encountered during retries N.B. you can also use FiniteDuration.toCoarsest to then obtain a more human friendly measurement as possible

Returns

N.B. It only captures the latest failure, if it encounters one.

Deprecated
@deprecated("Use .retryingOnAllErrors(...).attempt. N.B there exists more retry methods now, where you can specify which errors to recover from. See cats-retry documentation", "0.5.0")
def reattempt(retries: Int, betweenRetries: FiniteDuration)(implicit F: Temporal[F]): F[A]

Same semantics as overload reattempt but does not report any error

Same semantics as overload reattempt but does not report any error

Deprecated
@deprecated("Use .attempt.timedIn(TimeUnit), or .attempt.timed to default to nanoseconds", "0.5.0")
def timedAttempt(unit: TimeUnit)(implicit F: Temporal[F]): F[(FiniteDuration, Attempt[A])]
Value Params
unit

You probably don't want a granularity larger than MILLISECONDS for accurate timing. N.B. you can also use FiniteDuration.toCoarsest to then obtain a more human friendly measurement as possible

Returns

Never fails and captures the failure of the fa within the Attempt, times both success and failure case.

Deprecated
@deprecated("Use .retryingOnAllErrors(...).attempt.timedIn(TimeUnit), or retryingOnAllErrors(...).attempt.timed to default to nanoseconds. N.B there exists more retry methods now, where you can specify which errors to recover from. See cats-retry documentation", "0.5.0")
def timedReattempt(errorLog: (Throwable, String) => F[Unit], timeUnit: TimeUnit)(retries: Int, betweenRetries: FiniteDuration)(implicit F: Temporal[F]): F[(FiniteDuration, Attempt[A])]

Runs an effect F[A] a maximum of retries time, until it is not failed. Between each retry it waits betweenRetries. It also measures the time elapsed in total.

Runs an effect F[A] a maximum of retries time, until it is not failed. Between each retry it waits betweenRetries. It also measures the time elapsed in total.

Value Params
errorLog

Use this to specify how to log any error that happens within your fa, and any error encountered during retries

timeUnit

You probably don't want a granularity larger than MILLISECONDS for accurate timing. N.B. you can also use FiniteDuration.toCoarsest to then obtain a more human friendly measurement as possible

Returns

Never fails and captures the failure of the fa within the Attempt, times all successes and failures, and returns their sum. N.B. It only captures the latest failure, if it encounters one.

Deprecated
@deprecated("Use .retryingOnAllErrors(...).attempt.timedIn(TimeUnit), or retryingOnAllErrors(...).attempt.timed to default to nanoseconds. N.B there exists more retry methods now, where you can specify which errors to recover from. See cats-retry documentation", "0.5.0")
def timedReattempt(timeUnit: TimeUnit)(retries: Int, betweenRetries: FiniteDuration)(implicit F: Temporal[F]): F[(FiniteDuration, Attempt[A])]

Same as overload timedReattempt, but does not report any failures.

Same as overload timedReattempt, but does not report any failures.

Deprecated

Concrete fields

val fa: F[A]