Package akka.stream.scaladsl
Interface SubFlow<Out,Mat,F,C>
-
- All Superinterfaces:
FlowOps<Out,Mat>
public interface SubFlow<Out,Mat,F,C> extends FlowOps<Out,Mat>
A “stream of streams” sub-flow of data elements, e.g. produced bygroupBy
. SubFlows cannot contribute to the super-flow’s materialized value since they are materialized later, during the runtime of the flow graph processing.Not for user extension
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 aSink
to each sub-flow, closing the overall Graph that is being constructed.-
Methods inherited from interface akka.stream.scaladsl.FlowOps
$plus$plus, addAttributes, aggregateWithBoundary, alsoTo, alsoToAll, alsoToGraph, ask, ask, async, backpressureTimeout, batch, batchWeighted, buffer, collect, collectType, completionTimeout, concat, concatAllLazy, concatGraph, concatLazy, conflate, conflateWithSeed, delay, delay$default$2, delayWith, detach, divertTo, divertToGraph, drop, dropWhile, dropWithin, expand, extrapolate, extrapolate$default$2, filter, filterNot, flatMapConcat, flatMapMerge, flatMapPrefix, fold, foldAsync, groupBy, groupBy, grouped, groupedWeighted, groupedWeightedWithin, groupedWeightedWithin, groupedWithin, idleTimeout, initialDelay, initialTimeout, interleave, interleave, interleaveAll, interleaveGraph, interleaveGraph$default$3, internalConcat, internalConcatAll, intersperse, intersperse, keepAlive, limit, limitWeighted, log, log$default$2, log$default$3, logWithMarker, logWithMarker$default$3, logWithMarker$default$4, map, mapAsync, mapAsyncPartitioned, mapAsyncUnordered, mapConcat, mapError, mapWithResource, merge, merge$default$2, mergeAll, mergeGraph, mergeLatest, mergeLatest$default$2, mergeLatestGraph, mergePreferred, mergePreferred$default$3, mergePreferredGraph, mergePrioritized, mergePrioritized$default$4, mergePrioritizedGraph, mergeSorted, mergeSortedGraph, named, onErrorComplete, onErrorComplete, orElse, orElseGraph, prefixAndTail, prepend, prependGraph, prependLazy, recover, recoverWith, recoverWithRetries, reduce, scan, scanAsync, sliding, sliding$default$2, splitAfter, splitAfter, splitWhen, splitWhen, statefulMap, statefulMapConcat, take, takeWhile, takeWhile, takeWithin, throttle, throttle, throttle, throttle, via, watch, wireTap, wireTap, wireTapGraph, withAttributes, zip, zipAll, zipAllFlow, zipGraph, zipLatest, zipLatestGraph, zipLatestWith, zipLatestWith, zipLatestWithGraph, zipLatestWithGraph, zipWith, zipWithGraph, zipWithIndex
-
-
-
-
Method Detail
-
concatSubstreams
F concatSubstreams()
Flatten the sub-flows back into the super-flow by concatenating them. This is usually a bad idea when combined withgroupBy
since it can easily lead to deadlock—the concatenation does not consume from the second substream until the first has finished and thegroupBy
operator will get back-pressure from the second stream.This is identical in effect to
mergeSubstreamsWithParallelism(1)
.
-
mergeSubstreams
F mergeSubstreams()
Flatten the sub-flows back into the super-flow by performing a merge without parallelism limit (i.e. having an unbounded number of sub-flows active concurrently).This is identical in effect to
mergeSubstreamsWithParallelism(Integer.MAX_VALUE)
.
-
mergeSubstreamsWithParallelism
F mergeSubstreamsWithParallelism(int parallelism)
Flatten the sub-flows back into the super-flow by performing a merge with the given parallelism limit. This means that only up toparallelism
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.
-
to
<M> C to(Graph<SinkShape<Out>,M> sink)
Attach aSink
to each sub-flow, closing the overall Graph that is being constructed.Note that attributes set on the returned graph, including async boundaries are now for the entire graph and not the
SubFlow
. for exampleasync
will not have any effect as the returned graph is the entire, closed graph.
-
-