Package org.apache.pekko.stream.scaladsl
Interface SubFlow<Out,Mat,F,C>
- All Superinterfaces:
FlowOps<Out,Mat>
A “stream of streams” sub-flow of data elements, e.g. produced by
groupBy.
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
Modifier and TypeMethodDescriptionFlatten the sub-flows back into the super-flow by concatenating them.Flatten the sub-flows back into the super-flow by performing a merge without parallelism limit (i.e.mergeSubstreamsWithParallelism(int parallelism) Flatten the sub-flows back into the super-flow by performing a merge with the given parallelism limit.<M> CAttach aSinkto each sub-flow, closing the overall Graph that is being constructed.Methods inherited from interface org.apache.pekko.stream.scaladsl.FlowOps
$plus$plus, addAttributes, aggregateWithBoundary, alsoTo, alsoToAll, alsoToGraph, ask, ask, async, backpressureTimeout, batch, batchWeighted, buffer, collect, collectFirst, collectType, collectWhile, completionTimeout, concat, concatAllLazy, concatGraph, concatLazy, conflate, conflateWithSeed, delay, delay$default$2, delayWith, detach, divertTo, divertToGraph, doOnCancel, doOnFirst, drop, dropRepeated, dropRepeated, dropWhile, dropWithin, expand, extrapolate, extrapolate$default$2, filter, filterNot, flatMap, flatMapConcat, flatMapConcat, flatMapMerge, flatMapPrefix, flatten, flattenMerge, fold, foldAsync, foldWhile, groupBy, groupBy, grouped, groupedAdjacentBy, groupedAdjacentByWeighted, 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, mapAsyncPartitionedUnordered, mapAsyncUnordered, mapConcat, mapError, mapOption, mapWithResource, 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, onErrorContinue, onErrorContinue, orElse, orElseGraph, prefixAndTail, prepend, prependGraph, prependLazy, recover, recoverWith, recoverWithRetries, reduce, scan, scanAsync, sliding, sliding$default$2, splitAfter, splitAfter, splitWhen, splitWhen, statefulMap, statefulMapConcat, switchMap, take, takeUntil, takeWhile, takeWhile, takeWithin, throttle, throttle, throttle, throttle, via, watch, wireTap, wireTap, wireTapGraph, withAttributes, withFilter, zip, zipAll, zipAllFlow, zipGraph, zipLatest, zipLatestGraph, zipLatestWith, zipLatestWith, zipLatestWithGraph, zipLatestWithGraph, zipWith, zipWithGraph, zipWithIndex
-
Method Details
-
concatSubstreams
F concatSubstreams()Flatten the sub-flows back into the super-flow by concatenating them. This is usually a bad idea when combined withgroupBysince it can easily lead to deadlock—the concatenation does not consume from the second substream until the first has finished and thegroupByoperator 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
Flatten the sub-flows back into the super-flow by performing a merge with the given parallelism limit. This means that only up toparallelismsubstreams 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
Attach aSinkto 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 exampleasyncwill not have any effect as the returned graph is the entire, closed graph.
-