final case class When(logger: TracedLogger, depends: PartialFunction[Any, Policy]) extends Policy with Product with Serializable
A retry policy in which the failure determines the way a future should be retried.
The partial function depends
provided may define the domain of both the success OR exceptional
failure of a future fails explicitly.
val policy = retry.When { case RetryAfter(retryAt) => retry.Pause(delay = retryAt) } val future = policy(issueRequest)
If the result is not defined for the depends block, the future will not be retried.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- When
- Serializable
- Product
- Equals
- Policy
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new When(logger: TracedLogger, depends: PartialFunction[Any, Policy])
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
- def apply[T](task: => Future[T], retryable: ExceptionRetryPolicy)(implicit success: Success[T], executionContext: ExecutionContext, traceContext: TraceContext): Future[T]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- val depends: PartialFunction[Any, Policy]
- val directExecutionContext: DirectExecutionContext
- Attributes
- protected
- Definition Classes
- Policy
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val logger: TracedLogger
- 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def unlessShutdown[T](task: => FutureUnlessShutdown[T], retryOk: ExceptionRetryPolicy)(implicit success: Success[T], executionContext: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[T]
- 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])