#19267 add .viaAsync combinator
This commit is contained in:
parent
8a5a420108
commit
a733096564
6 changed files with 188 additions and 3 deletions
|
|
@ -61,7 +61,7 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source
|
|||
new Source(delegate.concatSubstreams)
|
||||
|
||||
/**
|
||||
* Transform this [[Flow]] by appending the given processing steps.
|
||||
* Transform this [[SubSource]] by appending the given processing steps.
|
||||
* {{{
|
||||
* +----------------------------+
|
||||
* | Resulting Source |
|
||||
|
|
@ -80,6 +80,27 @@ class SubSource[+Out, +Mat](delegate: scaladsl.SubFlow[Out, Mat, scaladsl.Source
|
|||
def via[T, M](flow: Graph[FlowShape[Out, T], M]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.via(flow))
|
||||
|
||||
/**
|
||||
* Transform this [[SubSource]] by appending the given processing steps, ensuring
|
||||
* that an `asyncBoundary` attribute is set around those steps.
|
||||
* {{{
|
||||
* +----------------------------+
|
||||
* | Resulting Source |
|
||||
* | |
|
||||
* | +------+ +------+ |
|
||||
* | | | | | |
|
||||
* | | this | ~Out~> | flow | ~~> T
|
||||
* | | | | | |
|
||||
* | +------+ +------+ |
|
||||
* +----------------------------+
|
||||
* }}}
|
||||
* The materialized value of the combined [[Flow]] will be the materialized
|
||||
* value of the current flow (ignoring the other Flow’s value), use
|
||||
* [[Flow#viaMat viaMat]] if a different strategy is needed.
|
||||
*/
|
||||
def viaAsync[T, M](flow: Graph[FlowShape[Out, T], M]): SubSource[T, Mat] =
|
||||
new SubSource(delegate.viaAsync(flow))
|
||||
|
||||
/**
|
||||
* Connect this [[SubSource]] to a [[Sink]], concatenating the processing steps of both.
|
||||
* This means that all sub-flows that result from the previous sub-stream operator
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue