public interface SubFlow<Out,Mat,F,C> extends FlowOps<Out,Mat>
groupBy
.
SubFlows cannot contribute to the super-flow’s materialized value since they
are materialized later, during the runtime of the flow graph processing.Modifier and Type | Method and Description |
---|---|
F |
concatSubstreams()
Flatten the sub-flows back into the super-flow by concatenating them.
|
F |
mergeSubstreams()
Flatten the sub-flows back into the super-flow by performing a merge
without parallelism limit (i.e.
|
F |
mergeSubstreamsWithParallelism(int parallelism)
Flatten the sub-flows back into the super-flow by performing a merge
with the given parallelism limit.
|
<M> C |
to(Graph<SinkShape<Out>,M> sink)
Attach a
Sink to each sub-flow, closing the overall Graph that is being
constructed. |
addAttributes, alsoTo, alsoToGraph, andThen, async, backpressureTimeout, batch, batchWeighted, buffer, collect, completionTimeout, concat, concatGraph, conflate, conflateWithSeed, delay, detach, drop, dropWhile, dropWithin, expand, filter, filterNot, flatMapConcat, flatMapMerge, fold, foldAsync, groupBy, grouped, groupedWithin, idleTimeout, initialDelay, initialTimeout, interleave, interleaveGraph, intersperse, intersperse, keepAlive, limit, limitWeighted, log, map, mapAsync, mapAsyncUnordered, mapConcat, mapError, merge, mergeGraph, mergeSorted, mergeSortedGraph, named, orElse, orElseGraph, prefixAndTail, prepend, prependGraph, recover, recoverWith, recoverWithRetries, reduce, scan, scanAsync, sliding, splitAfter, splitAfter, splitWhen, splitWhen, statefulMapConcat, take, takeWhile, takeWhile, takeWithin, throttle, throttle, transform, via, withAttributes, zip, zipGraph, zipWith, zipWithGraph, zipWithIndex
<M> C to(Graph<SinkShape<Out>,M> sink)
Sink
to each sub-flow, closing the overall Graph that is being
constructed.F mergeSubstreams()
This is identical in effect to mergeSubstreamsWithParallelism(Integer.MAX_VALUE)
.
F mergeSubstreamsWithParallelism(int parallelism)
parallelism
substreams will be executed at any given time. Substreams that are not
yet executed are also not materialized, meaning that back-pressure will
be exerted at the operator that creates the substreams when the parallelism
limit is reached.parallelism
- (undocumented)F concatSubstreams()
groupBy
since it can
easily lead to deadlock—the concatenation does not consume from the second
substream until the first has finished and the groupBy
stage will get
back-pressure from the second stream.
This is identical in effect to mergeSubstreamsWithParallelism(1)
.