Class

retry

BaseRetry

Related Doc: package retry

Permalink

abstract class BaseRetry[T] extends Retryable[T]

The base abstract class for different retry strategies. The original inspiration comes from https://gist.github.com/viktorklang/9414163, thanks to Viktor Klang and Chad Selph.

Linear Supertypes
Retryable[T], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BaseRetry
  2. Retryable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BaseRetry(retries: Int, initialDelay: FiniteDuration, ec: ExecutionContext, scheduler: Scheduler)

    Permalink

    retries

    the max retry count.

    initialDelay

    the initial delay for first retry.

    ec

    execution context.

Abstract Value Members

  1. abstract def nextDelay(delay: FiniteDuration): FiniteDuration

    Permalink

    Calc the next delay based on the previous delay.

    Calc the next delay based on the previous delay.

    delay

    the previous delay.

    returns

    the next delay.

    Attributes
    protected

Concrete 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. def apply(block: () ⇒ Future[T]): Retryable[T]

    Permalink

    Set an block/operation that will produce a Future[T].

    Set an block/operation that will produce a Future[T].

    returns

    current retryable instance.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. var block: () ⇒ Future[T]

    Permalink
    Attributes
    protected
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  17. var predicate: (T) ⇒ Boolean

    Permalink
    Attributes
    protected
  18. def retryWhen(predicate: (T) ⇒ Boolean): Future[T]

    Permalink

    Set the retry condition.

    Set the retry condition.

    returns

    the successful Future[T] or the last retried result.

    Definition Classes
    BaseRetryRetryable
  19. def stopWhen(predicate: (T) ⇒ Boolean): Future[T]

    Permalink

    Set the stop condition.

    Set the stop condition.

    returns

    the successful Future[T] or the last retried result.

    Definition Classes
    BaseRetryRetryable
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def withExecutionContext(ec: ExecutionContext): Retryable[T]

    Permalink

    Set customized execution context.

    Set customized execution context.

    returns

    current retryable instance.

    Definition Classes
    BaseRetryRetryable
  26. def withScheduler(scheduler: Scheduler): Retryable[T]

    Permalink

    Set customized execution scheduler.

    Set customized execution scheduler.

    returns

    current retryable instance.

    Definition Classes
    BaseRetryRetryable

Inherited from Retryable[T]

Inherited from AnyRef

Inherited from Any

Ungrouped