object Retry

This object defines methods for retry operations.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Retry
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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[I, O, S, M](flow: Graph[FlowShape[(I, S), (Try[O], S)], M])(retryWith: (S) ⇒ Option[(I, S)]): Graph[FlowShape[(I, S), (Try[O], S)], M]

    Retry flow factory.

    Retry flow factory. given a flow that produces Trys, this wrapping flow may be used to try and pass failed elements through the flow again. More accurately, the given flow consumes a tuple of input & state, and produces a tuple of Try of output and state. If the flow emits a failed element (i.e. Try is a Failure), the retryWith function is fed with the state of the failed element, and may produce a new input-state tuple to pass through the original flow. The function may also yield None instead of Some((input,state)), which means not to retry a failed element.

    IMPORTANT CAVEAT: The given flow must not change the number of elements passing through it (i.e. it should output exactly one element for every received element). Ignoring this, will have an unpredicted result, and may result in a deadlock.

    I

    input elements type

    O

    output elements type

    S

    state to create a new (I,S) to retry with

    M

    materialized value type

    flow

    the flow to retry

    retryWith

    if output was failure, we can optionaly recover from it, and retry with a new pair of input & new state we get from this function.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def concat[I, O, S, M](retriesLimit: Long, bufferLimit: Long, flow: Graph[FlowShape[(I, S), (Try[O], S)], M])(retryWith: (S) ⇒ Option[Iterable[(I, S)]]): Graph[FlowShape[(I, S), (Try[O], S)], M]

    Factory for multiple retries flow.

    Factory for multiple retries flow. similar to the simple retry, but this will allow to break down a "heavy" element which failed into multiple "thin" elements, that may succeed individually. Since it's easy to inflate elements in retry cycle, there's also a limit parameter, that will limit the amount of generated elements by the retryWith function, and will fail the stage if that limit is exceeded. Passing Some(Nil) is valid, and will result in filtering out the failure quietly, without emitting a failed Try element.

    In case of Failure element in the flow, the elements created from retryWith function are handled before pulling new elements from upstream.

    IMPORTANT CAVEAT: The given flow must not change the number of elements passing through it (i.e. it should output exactly one element for every received element). Ignoring this, will have an unpredicted result, and may result in a deadlock.

    I

    input elements type

    O

    output elements type

    S

    state to create a new (I,S) to retry with

    M

    materialized value type

    retriesLimit

    since every retry can generate more elements, the inner queue can get too big. if the limit is reached, the stage will fail.

    bufferLimit

    max number of concurrent elements that can be processed at a time.

    flow

    the flow to retry

    retryWith

    if output was failure, we can optionaly recover from it, and retry with a sequence of input & new state pairs we get from this function.

  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. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped