Class

wvlet.airframe.control.Retry

RetryContext

Related Doc: package Retry

Permalink

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)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val baseWaitMillis: Int

    Permalink
  6. def beforeRetry[U](handler: (RetryContext) ⇒ U): RetryContext

    Permalink
  7. val beforeRetryAction: (RetryContext) ⇒ Any

    Permalink
  8. def canContinue: Boolean

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  10. val context: Option[Any]

    Permalink
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. val errorClassifier: (Throwable) ⇒ Failed

    Permalink
  13. val extraWaitMillis: Int

    Permalink
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  15. def init(context: Option[Any] = None): RetryContext

    Permalink
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. val lastError: Throwable

    Permalink
  18. val maxRetry: Int

    Permalink
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. def nextRetry(retryReason: Throwable): RetryContext

    Permalink

    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

    Permalink
  22. def noRetry: RetryContext

    Permalink
  23. def noRetryLogging: RetryContext

    Permalink

    Clear the default beforeRetry action

  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  26. val resultClassifier: (Any) ⇒ ResultClass

    Permalink
  27. val retryCount: Int

    Permalink
  28. def retryOn(errorClassifier: PartialFunction[Throwable, Failed]): RetryContext

    Permalink

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

  29. val retryWaitStrategy: RetryPolicy

    Permalink
  30. def run[A](body: ⇒ A): A

    Permalink
  31. def runInternal[A](context: Option[Any])(body: ⇒ A): A

    Permalink
    Attributes
    protected
  32. def runWithContext[A](context: Any)(body: ⇒ A): A

    Permalink
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def withBackOff(initialIntervalMillis: Int = 100, maxIntervalMillis: Int = 15000, multiplier: Double = 1.5): RetryContext

    Permalink
  38. def withErrorClassifier(errorClassifier: (Throwable) ⇒ Failed): RetryContext

    Permalink

    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.

  39. def withExtraWait(extraWait: ExtraWait): RetryContext

    Permalink
  40. def withJitter(initialIntervalMillis: Int = 100, maxIntervalMillis: Int = 15000, multiplier: Double = 1.5): RetryContext

    Permalink
  41. def withMaxRetry(newMaxRetry: Int): RetryContext

    Permalink
  42. def withResultClassifier[U](newResultClassifier: (U) ⇒ ResultClass): RetryContext

    Permalink
  43. def withRetryWaitStrategy(newRetryWaitStrategy: RetryPolicy): RetryContext

    Permalink

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped