Class BidiFlow
TBD
Inherited Members
Namespace: Akka.Streams.Dsl
Assembly: Akka.Streams.dll
Syntax
public static class BidiFlow
Methods
| Improve this Doc View SourceBidirectionalIdleTimeout<TIn, TOut>(TimeSpan)
If the time between two processed elements ///in any direction/// exceed the provided timeout, the stream is failed with a 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.
Declaration
public static BidiFlow<TIn, TIn, TOut, TOut, NotUsed> BidirectionalIdleTimeout<TIn, TOut>(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | TBD |
Returns
Type | Description |
---|---|
BidiFlow<TIn, TIn, TOut, TOut, NotUsed> | TBD |
Type Parameters
Name | Description |
---|---|
TIn | TBD |
TOut | TBD |
FromFlows<TIn1, TOut1, TIn2, TOut2, TMat1, TMat2>(IGraph<FlowShape<TIn1, TOut1>, TMat1>, IGraph<FlowShape<TIn2, TOut2>, TMat2>)
Wraps two Flows to create a BidiFlow<TIn1, TOut1, TIn2, TOut2, TMat>. The materialized value of the resulting BidiFlow is NotUsed.
{{{
+----------------------------+
| Resulting BidiFlow |
| |
| +----------------------+ |
I1 > | Flow1 | ~~> O1
| +----------------------+ |
| |
| +----------------------+ |
O2 < | Flow2 | <~~ I2
| +----------------------+ |
+----------------------------+
}}}
Declaration
public static BidiFlow<TIn1, TOut1, TIn2, TOut2, NotUsed> FromFlows<TIn1, TOut1, TIn2, TOut2, TMat1, TMat2>(IGraph<FlowShape<TIn1, TOut1>, TMat1> flow1, IGraph<FlowShape<TIn2, TOut2>, TMat2> flow2)
Parameters
Type | Name | Description |
---|---|---|
IGraph<FlowShape<TIn1, TOut1>, TMat1> | flow1 | TBD |
IGraph<FlowShape<TIn2, TOut2>, TMat2> | flow2 | TBD |
Returns
Type | Description |
---|---|
BidiFlow<TIn1, TOut1, TIn2, TOut2, NotUsed> | TBD |
Type Parameters
Name | Description |
---|---|
TIn1 | TBD |
TOut1 | TBD |
TIn2 | TBD |
TOut2 | TBD |
TMat1 | TBD |
TMat2 | TBD |
FromFlowsMat<TIn1, TOut1, TIn2, TOut2, TMat1, TMat2, TMat>(IGraph<FlowShape<TIn1, TOut1>, TMat1>, IGraph<FlowShape<TIn2, TOut2>, TMat2>, Func<TMat1, TMat2, TMat>)
Wraps two Flows to create a BidiFlow<TIn1, TOut1, TIn2, TOut2, TMat>. 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
| +----------------------+ |
+----------------------------+
}}}
Declaration
public static BidiFlow<TIn1, TOut1, TIn2, TOut2, TMat> FromFlowsMat<TIn1, TOut1, TIn2, TOut2, TMat1, TMat2, TMat>(IGraph<FlowShape<TIn1, TOut1>, TMat1> flow1, IGraph<FlowShape<TIn2, TOut2>, TMat2> flow2, Func<TMat1, TMat2, TMat> combine)
Parameters
Type | Name | Description |
---|---|---|
IGraph<FlowShape<TIn1, TOut1>, TMat1> | flow1 | TBD |
IGraph<FlowShape<TIn2, TOut2>, TMat2> | flow2 | TBD |
Func<TMat1, TMat2, TMat> | combine | TBD |
Returns
Type | Description |
---|---|
BidiFlow<TIn1, TOut1, TIn2, TOut2, TMat> | TBD |
Type Parameters
Name | Description |
---|---|
TIn1 | TBD |
TOut1 | TBD |
TIn2 | TBD |
TOut2 | TBD |
TMat1 | TBD |
TMat2 | TBD |
TMat | TBD |
FromFunction<TIn1, TOut1, TIn2, TOut2>(Func<TIn1, TOut1>, Func<TIn2, TOut2>)
Create a BidiFlow<TIn1, TOut1, TIn2, TOut2, TMat> where the top and bottom flows are just one simple mapping stage each, expressed by the two functions.
Declaration
public static BidiFlow<TIn1, TOut1, TIn2, TOut2, NotUsed> FromFunction<TIn1, TOut1, TIn2, TOut2>(Func<TIn1, TOut1> outbound, Func<TIn2, TOut2> inbound)
Parameters
Type | Name | Description |
---|---|---|
Func<TIn1, TOut1> | outbound | TBD |
Func<TIn2, TOut2> | inbound | TBD |
Returns
Type | Description |
---|---|
BidiFlow<TIn1, TOut1, TIn2, TOut2, NotUsed> | TBD |
Type Parameters
Name | Description |
---|---|
TIn1 | TBD |
TOut1 | TBD |
TIn2 | TBD |
TOut2 | TBD |
FromGraph<TIn1, TOut1, TIn2, TOut2, TMat>(IGraph<BidiShape<TIn1, TOut1, TIn2, TOut2>, TMat>)
A graph with the shape of a flow logically is a flow, this method makes it so also in type.
Declaration
public static BidiFlow<TIn1, TOut1, TIn2, TOut2, TMat> FromGraph<TIn1, TOut1, TIn2, TOut2, TMat>(IGraph<BidiShape<TIn1, TOut1, TIn2, TOut2>, TMat> graph)
Parameters
Type | Name | Description |
---|---|---|
IGraph<BidiShape<TIn1, TOut1, TIn2, TOut2>, TMat> | graph | TBD |
Returns
Type | Description |
---|---|
BidiFlow<TIn1, TOut1, TIn2, TOut2, TMat> | TBD |
Type Parameters
Name | Description |
---|---|
TIn1 | TBD |
TOut1 | TBD |
TIn2 | TBD |
TOut2 | TBD |
TMat | TBD |