Retry

gears.async.Retry
See theRetry companion object
case class Retry(retryOnSuccess: Boolean, maximumFailures: Option[Int], delay: Delay)

Utility class to perform asynchronous actions with retrying policies on exceptions.

See Retry companion object for common policies as a starting point.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def apply[T](op: => T)(using Async, AsyncOperations): T

Runs body with the current policy in its own scope, returning the result or the last failure as an exception.

Runs body with the current policy in its own scope, returning the result or the last failure as an exception.

Attributes

def withDelay(delay: Delay): Retry

Set the delay policy between runs. See Retry.Delay.

Set the delay policy between runs. See Retry.Delay.

Attributes

def withMaximumFailures(max: Int): Retry

Set the maximum failure count.

Set the maximum failure count.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product