Package

util.retry

blocking

Permalink

package blocking

Visibility
  1. Public
  2. All

Type Members

  1. final case class Failure[+T](exception: Throwable) extends Retry[T] with Product with Serializable

    Permalink
  2. class FibonacciBackOffStrategy extends MaxNumberOfRetriesStrategy with Sleep

    Permalink
  3. class FixedWaitRetryStrategy extends MaxNumberOfRetriesStrategy with Sleep

    Permalink
  4. class MaxNumberOfRetriesStrategy extends RetryStrategy

    Permalink
  5. class RandomWaitRetryStrategy extends MaxNumberOfRetriesStrategy with Sleep

    Permalink
  6. sealed trait Retry[+T] extends AnyRef

    Permalink

    The Retry type represents a computation that is retrying itself in case of an exception.

    The Retry type represents a computation that is retrying itself in case of an exception. It uses a RetryStrategy as a policy for the retry operation.

    The result may be successful consisting of the computation result value or a failure that is wrapping the underlying exception. The type is similar to the scala scala.util.Try type.

    Example:

    import scala.concurrent.duration._
    import util.retry.blocking.{RetryStrategy, Failure, Retry, Success}
    
    implicit val retryStrategy =
     RetryStrategy.fixedBackOff(retryDuration = 1.seconds, maxAttempts = 2)
    
    val r = Retry(1 / 1) match {
      case Success(x) => x
      case Failure(t) => log("Exception occurred", t)
    }
  7. class RetryForever extends RetryStrategy

    Permalink
  8. sealed trait RetryStrategy extends AnyRef

    Permalink

    Interface defining a retry strategy

  9. sealed trait Sleep extends AnyRef

    Permalink
  10. final case class Success[+T](value: T) extends Retry[T] with Product with Serializable

    Permalink

Value Members

  1. object NoRetry extends RetryStrategy

    Permalink

    Simplest retry strategy that performs retry

  2. object Retry

    Permalink
  3. object RetryStrategy

    Permalink

Ungrouped