package retry
- Alphabetic
- Public
- All
Type Members
-
trait
BackoffStrategy extends AnyRef
A strategy to compute a backoff.
-
final
class
ConstantBackoffStrategy extends BackoffStrategy
A strategy that always returns the same backoff.
-
final
class
ExponentialBackoffStrategy extends BackoffStrategy
A strategy to calculate an exponential backoff.
A strategy to calculate an exponential backoff.
The formula is as follows. The randomValue value is [1.0, 1.0 +
randomFactor
].minBackoff * (multiplier ^ (trialTimes - 1)) * randomValue
However,
nextDelay
returnsmaxBackoff
*randomFactor
if the calculated backoff exceedsmaxBackoff
. -
final
class
RetryFailurewall[A] extends Failurewall[A, A]
A Failurewall implementing the retry pattern.
A Failurewall implementing the retry pattern. Calls wrapped in RetryFailurewall can be retried if it fails.
RetryFailurewall is recommended for resources which may become temporarily unavailable.
-
sealed abstract
class
RetryFeedback extends AnyRef
Whether the call should be retried or not.
Value Members
- object ConstantBackoffStrategy
- object ExponentialBackoffStrategy
- object RetryFailurewall
-
object
ShouldNotRetry extends RetryFeedback with Product with Serializable
The call should not be retried.
The call should not be retried. This should be used when the operation is successful or the error is not transient.
- business logic error - the resource that user requests is not found - a service is under maintenance
-
object
ShouldRetry extends RetryFeedback with Product with Serializable
The call should be retried.
The call should be retried. This should be used when the error may be transient.
- a session is disconnected - a service is temporary unavailable