package
retry
Type Members
-
sealed
trait
BackOff extends Serializable
-
case class
CircuitBreakerContext(state: State = Close, failureCount: Int = 0, successCount: Int = 0, lastFailure: Option[FailureInfo] = None) extends Product with Serializable
-
-
case class
FailureInfo(timestampMillis: Long, exception: Throwable) extends Product with Serializable
-
case class
RetryContext(retryCount: Int, exception: Throwable) extends Product with Serializable
-
-
case class
RetryPolicy(maxAttempts: Int, retryDuration: FiniteDuration, backOff: BackOff = FixedBackOff, jitter: FiniteDuration = 0.second, onRetry: (RetryContext) ⇒ Unit = _ => (), onFailure: (RetryContext) ⇒ Unit = _ => ()) extends Product with Serializable
Value Members
-
-
-
-
-
object
RetryPolicy extends Serializable
-
def
circuitBreaker[T](f: ⇒ T)(implicit policy: CircuitBreakerPolicy): T
-
def
circuitBreakerAsEither[T](f: ⇒ T)(implicit policy: CircuitBreakerPolicy): Either[Throwable, T]
-
def
circuitBreakerAsTry[T](f: ⇒ T)(implicit policy: CircuitBreakerPolicy): Try[T]
-
def
retry[T](f: ⇒ T)(implicit policy: RetryPolicy): T
-
def
retryAsEither[T](f: ⇒ T)(implicit policy: RetryPolicy): Either[Throwable, T]
-
def
retryBlockingAsTry[T](f: ⇒ T)(implicit policy: RetryPolicy): Try[T]
-
def
retryFuture[T](f: ⇒ Future[T])(implicit policy: RetryPolicy, retryManager: RetryManager, ec: ExecutionContext): Future[T]
Inherited from AnyRef
Inherited from Any