Packages

case class RetryContext(context: Option[Any], lastError: Throwable, retryCount: Int, maxRetry: Int, retryWaitStrategy: RetryPolicy, nextWaitMillis: Int, baseWaitMillis: Int, extraWaitMillis: Int, resultClassifier: (Any) ⇒ ResultClass = ResultClass.ALWAYS_SUCCEED, errorClassifier: (Throwable) ⇒ Failed = ResultClass.ALWAYS_RETRY, beforeRetryAction: (RetryContext) ⇒ Any = REPORT_RETRY_COUNT) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RetryContext
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RetryContext(context: Option[Any], lastError: Throwable, retryCount: Int, maxRetry: Int, retryWaitStrategy: RetryPolicy, nextWaitMillis: Int, baseWaitMillis: Int, extraWaitMillis: Int, resultClassifier: (Any) ⇒ ResultClass = ResultClass.ALWAYS_SUCCEED, errorClassifier: (Throwable) ⇒ Failed = ResultClass.ALWAYS_RETRY, beforeRetryAction: (RetryContext) ⇒ Any = REPORT_RETRY_COUNT)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val baseWaitMillis: Int
  6. def beforeRetry[U](handler: (RetryContext) ⇒ U): RetryContext
  7. val beforeRetryAction: (RetryContext) ⇒ Any
  8. def canContinue: Boolean
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  10. val context: Option[Any]
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. val errorClassifier: (Throwable) ⇒ Failed
  13. val extraWaitMillis: Int
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def init(context: Option[Any] = None): RetryContext
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val lastError: Throwable
  18. val maxRetry: Int
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def nextRetry(retryReason: Throwable): RetryContext

    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

  21. val nextWaitMillis: Int
  22. def noRetry: RetryContext
  23. def noRetryLogging: RetryContext

    Clear the default beforeRetry action

  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. val resultClassifier: (Any) ⇒ ResultClass
  27. val retryCount: Int
  28. def retryOn(errorClassifier: PartialFunction[Throwable, Failed]): RetryContext

    Add a partial function that accepts exceptions that need to be retried.

  29. val retryWaitStrategy: RetryPolicy
  30. def run[A](body: ⇒ A): A
  31. def runAsyncWithContext[A](context: Any, circuitBreaker: CircuitBreaker = CircuitBreaker.alwaysClosed)(body: ⇒ Future[A])(implicit ec: ExecutionContext): Future[A]
  32. def runInternal[A](context: Option[Any], circuitBreaker: CircuitBreaker = CircuitBreaker.alwaysClosed)(body: ⇒ A): A
    Attributes
    protected
  33. def runWithContext[A](context: Any, circuitBreaker: CircuitBreaker = CircuitBreaker.alwaysClosed)(body: ⇒ A): A
  34. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. def withBackOff(initialIntervalMillis: Int = 100, maxIntervalMillis: Int = 15000, multiplier: Double = 1.5): RetryContext
  39. def withErrorClassifier(errorClassifier: (Throwable) ⇒ Failed): RetryContext

    Set a detailed error handler upon Exception.

    Set a detailed error handler upon Exception. If the given exception is not retryable, just rethrow the exception. Otherwise, consume the exception.

  40. def withExtraWait(extraWait: ExtraWait): RetryContext
  41. def withJitter(initialIntervalMillis: Int = 100, maxIntervalMillis: Int = 15000, multiplier: Double = 1.5): RetryContext
  42. def withMaxRetry(newMaxRetry: Int): RetryContext
  43. def withResultClassifier[U](newResultClassifier: (U) ⇒ ResultClass): RetryContext
  44. def withRetryWaitStrategy(newRetryWaitStrategy: RetryPolicy): RetryContext

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped