RetryContext
case
class RetryContext(context: Option[Any], lastError: Throwable, retryCount: Int, maxRetry: Int, retryWaitStrategy: RetryPolicy, nextWaitMillis: Int, baseWaitMillis: Int, extraWaitMillis: Int, resultClassifier: Any => ResultClass, errorClassifier: Throwable => Failed, beforeRetryAction: RetryContext => Any)
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Value members
Concrete methods
Update the retry context, including retry count, last error, next wait time, etc.
Update the retry context, including retry count, last error, next wait time, etc.
- Returns
the next retry context
Add a partial function that accepts exceptions that need to be retried.
Add a partial function that accepts exceptions that need to be retried.
def withBackOff(initialIntervalMillis: Int, maxIntervalMillis: Int, multiplier: Double): RetryContext
Set a detailed error handler upon Exception. If the given exception is not retryable, just rethrow the exception. Otherwise, consume the exception.
Set a detailed error handler upon Exception. If the given exception is not retryable, just rethrow the exception. Otherwise, consume the exception.
def withJitter(initialIntervalMillis: Int, maxIntervalMillis: Int, multiplier: Double): RetryContext