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, resultClassifier: (Any) ⇒ ResultClass = ResultClass.ALWAYS_SUCCEED, errorClassifier: (Throwable) ⇒ ResultClass = 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, resultClassifier: (Any) ⇒ ResultClass = ResultClass.ALWAYS_SUCCEED, errorClassifier: (Throwable) ⇒ ResultClass = 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) ⇒ ResultClass

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

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

    Permalink
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val lastError: Throwable

    Permalink
  17. val maxRetry: Int

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

    Permalink
    Definition Classes
    AnyRef
  19. 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

  20. val nextWaitMillis: Int

    Permalink
  21. final def notify(): Unit

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

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

    Permalink
  24. val retryCount: Int

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

    Permalink

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

  26. val retryWaitStrategy: RetryPolicy

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

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

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

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

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

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

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

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

    Permalink
  35. def withErrorClassifier[U](errorClassifier: (Throwable) ⇒ U): 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.

  36. def withExtraWaitMillis(extraWaitMillis: Int): RetryContext

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

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

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

    Permalink
  40. 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