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
    @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. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  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. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. val resultClassifier: (Any) ⇒ ResultClass

    Permalink
  25. val retryCount: Int

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

    Permalink

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

  27. val retryWaitStrategy: RetryPolicy

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit

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

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

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

  37. def withExtraWaitMillis(extraWaitMillis: Int): RetryContext

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

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

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

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

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped