Packages

object BidiFlow

Source
BidiFlow.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BidiFlow
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def bidirectionalIdleTimeout[I, O](timeout: FiniteDuration): BidiFlow[I, I, O, O, NotUsed]

    If the time between two processed elements *in any direction* exceed the provided timeout, the stream is failed with a scala.concurrent.TimeoutException.

    If the time between two processed elements *in any direction* exceed the provided timeout, the stream is failed with a scala.concurrent.TimeoutException.

    There is a difference between this operator and having two idleTimeout Flows assembled into a BidiStage. If the timeout is configured to be 1 seconds, then this operator will not fail even though there are elements flowing every second in one direction, but no elements are flowing in the other direction. I.e. this operator considers the *joint* frequencies of the elements in both directions.

  2. def fromFlows[I1, O1, I2, O2, M1, M2](flow1: Graph[FlowShape[I1, O1], M1], flow2: Graph[FlowShape[I2, O2], M2]): BidiFlow[I1, O1, I2, O2, NotUsed]

    Wraps two Flows to create a BidiFlow.

    Wraps two Flows to create a BidiFlow. The materialized value of the resulting BidiFlow is Unit.

        +----------------------------+
        | Resulting BidiFlow         |
        |                            |
        |  +----------------------+  |
    I1 ~~> |        Flow1         | ~~> O1
        |  +----------------------+  |
        |                            |
        |  +----------------------+  |
    O2 <~~ |        Flow2         | <~~ I2
        |  +----------------------+  |
        +----------------------------+
  3. def fromFlowsMat[I1, O1, I2, O2, M1, M2, M](flow1: Graph[FlowShape[I1, O1], M1], flow2: Graph[FlowShape[I2, O2], M2])(combine: (M1, M2) ⇒ M): BidiFlow[I1, O1, I2, O2, M]

    Wraps two Flows to create a BidiFlow.

    Wraps two Flows to create a BidiFlow. The materialized value of the resulting BidiFlow is determined by the combiner function passed in the second argument list.

        +----------------------------+
        | Resulting BidiFlow         |
        |                            |
        |  +----------------------+  |
    I1 ~~> |        Flow1         | ~~> O1
        |  +----------------------+  |
        |                            |
        |  +----------------------+  |
    O2 <~~ |        Flow2         | <~~ I2
        |  +----------------------+  |
        +----------------------------+
  4. def fromFunctions[I1, O1, I2, O2](outbound: (I1) ⇒ O1, inbound: (I2) ⇒ O2): BidiFlow[I1, O1, I2, O2, NotUsed]

    Create a BidiFlow where the top and bottom flows are just one simple mapping operator each, expressed by the two functions.

  5. def fromGraph[I1, O1, I2, O2, Mat](graph: Graph[BidiShape[I1, O1, I2, O2], Mat]): BidiFlow[I1, O1, I2, O2, Mat]

    A graph with the shape of a flow logically is a flow, this method makes it so also in type.

  6. def identity[A, B]: BidiFlow[A, A, B, B, NotUsed]