case class RetryPolicy(termination: TerminationPolicy = RetryPolicy.defaultTermination, backoff: BackoffPolicy = RetryPolicy.defaultBackoff, monitor: EventMonitor = RetryPolicy.defaultMonitor, results: ResultClassifier = RetryPolicy.defaultResults, errors: ErrorClassifier = RetryPolicy.defaultErrors) extends Product with Serializable
A policy that enables customizable retries for arbitrary operations.
- termination
The strategy for determining when to abort a retry operation.
- backoff
The strategy used to calculate delays between retries.
- monitor
The monitor that is notified of retry events.
- results
The classifier for results returned during retry operations.
- errors
The classifier for errors raised during retry operations.
- Alphabetic
- By Inheritance
- RetryPolicy
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new RetryPolicy(termination: TerminationPolicy = RetryPolicy.defaultTermination, backoff: BackoffPolicy = RetryPolicy.defaultBackoff, monitor: EventMonitor = RetryPolicy.defaultMonitor, results: ResultClassifier = RetryPolicy.defaultResults, errors: ErrorClassifier = RetryPolicy.defaultErrors)
- termination
The strategy for determining when to abort a retry operation.
- backoff
The strategy used to calculate delays between retries.
- monitor
The monitor that is notified of retry events.
- results
The classifier for results returned during retry operations.
- errors
The classifier for errors raised during retry operations.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val backoff: BackoffPolicy
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val errors: ErrorClassifier
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val monitor: EventMonitor
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val results: ResultClassifier
- def retry[T](name: Option[String])(operation: => T)(implicit clock: Clock): T
Performs the specified optionally named operation synchronously, retrying according to this policy.
Performs the specified optionally named operation synchronously, retrying according to this policy.
- T
The return type of the operation being retried.
- name
The optional name of the operation.
- operation
The operation to repeatedly perform.
- clock
The clock used to track time and wait out backoff delays.
- def retry[T](name: String)(operation: => T)(implicit clock: Clock): T
Performs the specified named operation synchronously, retrying according to this policy.
Performs the specified named operation synchronously, retrying according to this policy.
- T
The return type of the operation being retried.
- name
The name of the operation.
- operation
The operation to repeatedly perform.
- clock
The clock used to track time and wait out backoff delays.
- def retry[T]()(operation: => T)(implicit clock: Clock): T
Performs the specified operation synchronously, retrying according to this policy.
Performs the specified operation synchronously, retrying according to this policy.
- T
The return type of the operation being retried.
- operation
The operation to repeatedly perform.
- clock
The clock used to track time and wait out backoff delays.
- def retryAsync[T](name: Option[String])(operation: => Future[T])(implicit ec: ExecutionContext, clock: Clock): Future[T]
Performs the specified optionally named operation asynchronously, retrying according to this policy.
Performs the specified optionally named operation asynchronously, retrying according to this policy.
- T
The return type of the operation being retried.
- name
The optional name of the operation.
- operation
The operation to repeatedly perform.
- ec
The execution context to retry on.
- clock
The clock used to track time and schedule backoff notifications.
- def retryAsync[T](name: String)(operation: => Future[T])(implicit ec: ExecutionContext, clock: Clock): Future[T]
Performs the specified optionally named operation asynchronously, retrying according to this policy.
Performs the specified optionally named operation asynchronously, retrying according to this policy.
- T
The return type of the operation being retried.
- name
The name of the operation.
- operation
The operation to repeatedly perform.
- ec
The execution context to retry on.
- clock
The clock used to track time and schedule backoff notifications.
- def retryAsync[T]()(operation: => Future[T])(implicit ec: ExecutionContext, clock: Clock): Future[T]
Performs the specified operation asynchronously, retrying according to this policy.
Performs the specified operation asynchronously, retrying according to this policy.
- T
The return type of the operation being retried.
- operation
The operation to repeatedly perform.
- ec
The execution context to retry on.
- clock
The clock used to track time and schedule backoff notifications.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val termination: TerminationPolicy
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated