Packages

c

retry

BaseRetry

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
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)

    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

    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
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(block: () ⇒ Future[T]): Retryable[T]

    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
    Definition Classes
    Any
  6. var block: () ⇒ Future[T]
    Attributes
    protected
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. var predicate: (T) ⇒ Boolean
    Attributes
    protected
  18. def retryWhen(predicate: (T) ⇒ Boolean): Future[T]

    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]

    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
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  25. def withExecutionContext(ec: ExecutionContext): Retryable[T]

    Set customized execution context.

    Set customized execution context.

    returns

    current retryable instance.

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

    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