package blocking
Ordering
- Alphabetic
Visibility
- Public
- All
Type Members
- final case class Failure [+T](exception: Throwable) extends Retry[T] with Product with Serializable
- class FibonacciBackOffStrategy extends MaxNumberOfRetriesStrategy with Sleep
- class FixedWaitRetryStrategy extends MaxNumberOfRetriesStrategy with Sleep
- class MaxNumberOfRetriesStrategy extends RetryStrategy
- class RandomWaitRetryStrategy extends MaxNumberOfRetriesStrategy with Sleep
-
sealed
trait
Retry
[+T] extends AnyRef
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 aRetryStrategy
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) => println(x) case Failure(t) => println(t) }
-
sealed
trait
RetryStrategy
extends AnyRef
Interface defining a retry strategy
- sealed trait Sleep extends AnyRef
- final case class Success [+T](value: T) extends Retry[T] with Product with Serializable
Value Members
-
object
NoRetry
extends RetryStrategy
Simplest retry strategy that performs retry
- object Retry
- object RetryStrategy