public class BidiFlow$
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static BidiFlow$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
BidiFlow$() |
Modifier and Type | Method and Description |
---|---|
<I,O> BidiFlow<I,I,O,O,NotUsed> |
bidirectionalIdleTimeout(scala.concurrent.duration.FiniteDuration timeout)
If the time between two processed elements *in any direction* exceed the provided timeout, the stream is failed
with a
scala.concurrent.TimeoutException . |
<I1,O1,I2,O2,M1,M2> |
fromFlows(Graph<FlowShape<I1,O1>,M1> flow1,
Graph<FlowShape<I2,O2>,M2> flow2)
Wraps two Flows to create a ''BidiFlow''.
|
<I1,O1,I2,O2,M1,M2,M> |
fromFlowsMat(Graph<FlowShape<I1,O1>,M1> flow1,
Graph<FlowShape<I2,O2>,M2> flow2,
scala.Function2<M1,M2,M> combine)
Wraps two Flows to create a ''BidiFlow''.
|
<I1,O1,I2,O2> |
fromFunctions(scala.Function1<I1,O1> outbound,
scala.Function1<I2,O2> inbound)
Create a BidiFlow where the top and bottom flows are just one simple mapping
stage each, expressed by the two functions.
|
<I1,O1,I2,O2,Mat> |
fromGraph(Graph<BidiShape<I1,O1,I2,O2>,Mat> graph)
A graph with the shape of a flow logically is a flow, this method makes
it so also in type.
|
<A,B> BidiFlow<A,A,B,B,NotUsed> |
identity() |
public static final BidiFlow$ MODULE$
public <I1,O1,I2,O2,Mat> BidiFlow<I1,O1,I2,O2,Mat> fromGraph(Graph<BidiShape<I1,O1,I2,O2>,Mat> graph)
graph
- (undocumented)public <I1,O1,I2,O2,M1,M2,M> BidiFlow<I1,O1,I2,O2,M> fromFlowsMat(Graph<FlowShape<I1,O1>,M1> flow1, Graph<FlowShape<I2,O2>,M2> flow2, scala.Function2<M1,M2,M> combine)
+----------------------------+
| Resulting BidiFlow |
| |
| +----------------------+ |
I1 ~~> | Flow1 | ~~> O1
| +----------------------+ |
| |
| +----------------------+ |
O2 <~~ | Flow2 | <~~ I2
| +----------------------+ |
+----------------------------+
flow1
- (undocumented)flow2
- (undocumented)combine
- (undocumented)public <I1,O1,I2,O2,M1,M2> BidiFlow<I1,O1,I2,O2,NotUsed> fromFlows(Graph<FlowShape<I1,O1>,M1> flow1, Graph<FlowShape<I2,O2>,M2> flow2)
+----------------------------+
| Resulting BidiFlow |
| |
| +----------------------+ |
I1 ~~> | Flow1 | ~~> O1
| +----------------------+ |
| |
| +----------------------+ |
O2 <~~ | Flow2 | <~~ I2
| +----------------------+ |
+----------------------------+
flow1
- (undocumented)flow2
- (undocumented)public <I1,O1,I2,O2> BidiFlow<I1,O1,I2,O2,NotUsed> fromFunctions(scala.Function1<I1,O1> outbound, scala.Function1<I2,O2> inbound)
outbound
- (undocumented)inbound
- (undocumented)public <I,O> BidiFlow<I,I,O,O,NotUsed> bidirectionalIdleTimeout(scala.concurrent.duration.FiniteDuration timeout)
scala.concurrent.TimeoutException
.
There is a difference between this stage and having two idleTimeout Flows assembled into a BidiStage. If the timeout is configured to be 1 seconds, then this stage 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 stage considers the *joint* frequencies of the elements in both directions.
timeout
- (undocumented)