Modifier and Type | Class and Description |
---|---|
static interface |
SubFlowImpl.MergeBack<In,F> |
Constructor and Description |
---|
SubFlowImpl(Flow<In,Out,NotUsed> subFlow,
SubFlowImpl.MergeBack<In,F> mergeBackFunction,
scala.Function1<Sink<In,NotUsed>,C> finishFunction) |
Modifier and Type | Method and Description |
---|---|
static <U,M> FlowOps |
$plus$plus(Graph<SourceShape<U>,M> that) |
SubFlow<Out,Mat,F,C> |
addAttributes(Attributes attr) |
static FlowOps |
alsoTo(Graph<SinkShape<Out>,?> that) |
protected static <M> Graph<FlowShape<Out,Out>,M> |
alsoToGraph(Graph<SinkShape<Out>,M> that) |
static <T> FlowOps |
andThen(Stages.SymbolicStage<Out,T> op) |
SubFlow<Out,Mat,F,C> |
async()
Put an asynchronous boundary around this
Flow . |
static FlowOps |
backpressureTimeout(scala.concurrent.duration.FiniteDuration timeout) |
static <S> FlowOps |
batch(long max,
scala.Function1<Out,S> seed,
scala.Function2<S,Out,S> aggregate) |
static <S> FlowOps |
batchWeighted(long max,
scala.Function1<Out,java.lang.Object> costFn,
scala.Function1<Out,S> seed,
scala.Function2<S,Out,S> aggregate) |
static FlowOps |
buffer(int size,
OverflowStrategy overflowStrategy) |
static <T> FlowOps |
collect(scala.PartialFunction<Out,T> pf) |
static FlowOps |
completionTimeout(scala.concurrent.duration.FiniteDuration timeout) |
static <U,Mat2> FlowOps |
concat(Graph<SourceShape<U>,Mat2> that) |
protected static <U,Mat2> Graph<FlowShape<Out,U>,Mat2> |
concatGraph(Graph<SourceShape<U>,Mat2> that) |
static F |
concatSubstreams() |
static <O2> FlowOps |
conflate(scala.Function2<O2,O2,O2> aggregate) |
static <S> FlowOps |
conflateWithSeed(scala.Function1<Out,S> seed,
scala.Function2<S,Out,S> aggregate) |
static FlowOps |
delay(scala.concurrent.duration.FiniteDuration of,
DelayOverflowStrategy strategy) |
static DelayOverflowStrategy |
delay$default$2() |
static FlowOps |
detach() |
static FlowOps |
drop(long n) |
static FlowOps |
dropWhile(scala.Function1<Out,java.lang.Object> p) |
static FlowOps |
dropWithin(scala.concurrent.duration.FiniteDuration d) |
static <U> FlowOps |
expand(scala.Function1<Out,scala.collection.Iterator<U>> extrapolate) |
static FlowOps |
filter(scala.Function1<Out,java.lang.Object> p) |
static FlowOps |
filterNot(scala.Function1<Out,java.lang.Object> p) |
static <T,M> FlowOps |
flatMapConcat(scala.Function1<Out,Graph<SourceShape<T>,M>> f) |
static <T,M> FlowOps |
flatMapMerge(int breadth,
scala.Function1<Out,Graph<SourceShape<T>,M>> f) |
static <T> FlowOps |
fold(T zero,
scala.Function2<T,Out,T> f) |
static <T> FlowOps |
foldAsync(T zero,
scala.Function2<T,Out,scala.concurrent.Future<T>> f) |
static <K> SubFlow<Out,Mat,FlowOps,java.lang.Object> |
groupBy(int maxSubstreams,
scala.Function1<Out,K> f) |
static FlowOps |
grouped(int n) |
static FlowOps |
groupedWithin(int n,
scala.concurrent.duration.FiniteDuration d) |
static FlowOps |
idleTimeout(scala.concurrent.duration.FiniteDuration timeout) |
static FlowOps |
initialDelay(scala.concurrent.duration.FiniteDuration delay) |
static FlowOps |
initialTimeout(scala.concurrent.duration.FiniteDuration timeout) |
static <U> FlowOps |
interleave(Graph<SourceShape<U>,?> that,
int segmentSize) |
protected static <U,M> Graph<FlowShape<Out,U>,M> |
interleaveGraph(Graph<SourceShape<U>,M> that,
int segmentSize) |
static <T> FlowOps |
intersperse(T inject) |
static <T> FlowOps |
intersperse(T start,
T inject,
T end) |
static <U> FlowOps |
keepAlive(scala.concurrent.duration.FiniteDuration maxIdle,
scala.Function0<U> injectedElem) |
static FlowOps |
limit(long max) |
static <T> FlowOps |
limitWeighted(long max,
scala.Function1<Out,java.lang.Object> costFn) |
static FlowOps |
log(java.lang.String name,
scala.Function1<Out,java.lang.Object> extract,
LoggingAdapter log) |
static scala.Function1<Out,java.lang.Object> |
log$default$2() |
static LoggingAdapter |
log$default$3(java.lang.String name,
scala.Function1<Out,java.lang.Object> extract) |
static <T> FlowOps |
map(scala.Function1<Out,T> f) |
static <T> FlowOps |
mapAsync(int parallelism,
scala.Function1<Out,scala.concurrent.Future<T>> f) |
static <T> FlowOps |
mapAsyncUnordered(int parallelism,
scala.Function1<Out,scala.concurrent.Future<T>> f) |
static <T> FlowOps |
mapConcat(scala.Function1<Out,scala.collection.immutable.Iterable<T>> f) |
static FlowOps |
mapError(scala.PartialFunction<java.lang.Throwable,java.lang.Throwable> pf) |
static <U,M> FlowOps |
merge(Graph<SourceShape<U>,M> that,
boolean eagerComplete) |
static <U,M> boolean |
merge$default$2() |
protected static <U,M> Graph<FlowShape<Out,U>,M> |
mergeGraph(Graph<SourceShape<U>,M> that,
boolean eagerComplete) |
static <U,M> FlowOps |
mergeSorted(Graph<SourceShape<U>,M> that,
scala.math.Ordering<U> ord) |
protected static <U,M> Graph<FlowShape<Out,U>,M> |
mergeSortedGraph(Graph<SourceShape<U>,M> that,
scala.math.Ordering<U> ord) |
static F |
mergeSubstreams() |
F |
mergeSubstreamsWithParallelism(int breadth)
Flatten the sub-flows back into the super-flow by performing a merge
with the given parallelism limit.
|
SubFlow<Out,Mat,F,C> |
named(java.lang.String name) |
static <U,Mat2> FlowOps |
orElse(Graph<SourceShape<U>,Mat2> secondary) |
protected static <U,Mat2> Graph<FlowShape<Out,U>,Mat2> |
orElseGraph(Graph<SourceShape<U>,Mat2> secondary) |
static <U> FlowOps |
prefixAndTail(int n) |
static <U,Mat2> FlowOps |
prepend(Graph<SourceShape<U>,Mat2> that) |
protected static <U,Mat2> Graph<FlowShape<Out,U>,Mat2> |
prependGraph(Graph<SourceShape<U>,Mat2> that) |
static <T> FlowOps |
recover(scala.PartialFunction<java.lang.Throwable,T> pf) |
static <T> FlowOps |
recoverWith(scala.PartialFunction<java.lang.Throwable,Graph<SourceShape<T>,NotUsed>> pf) |
static <T> FlowOps |
recoverWithRetries(int attempts,
scala.PartialFunction<java.lang.Throwable,Graph<SourceShape<T>,NotUsed>> pf) |
static <T> FlowOps |
reduce(scala.Function2<T,T,T> f) |
static <T> FlowOps |
scan(T zero,
scala.Function2<T,Out,T> f) |
static <T> FlowOps |
scanAsync(T zero,
scala.Function2<T,Out,scala.concurrent.Future<T>> f) |
static FlowOps |
sliding(int n,
int step) |
static int |
sliding$default$2() |
static SubFlow<Out,Mat,FlowOps,java.lang.Object> |
splitAfter(scala.Function1<Out,java.lang.Object> p) |
static SubFlow<Out,Mat,FlowOps,java.lang.Object> |
splitAfter(SubstreamCancelStrategy substreamCancelStrategy,
scala.Function1<Out,java.lang.Object> p) |
static SubFlow<Out,Mat,FlowOps,java.lang.Object> |
splitWhen(scala.Function1<Out,java.lang.Object> p) |
static SubFlow<Out,Mat,FlowOps,java.lang.Object> |
splitWhen(SubstreamCancelStrategy substreamCancelStrategy,
scala.Function1<Out,java.lang.Object> p) |
static <T> FlowOps |
statefulMapConcat(scala.Function0<scala.Function1<Out,scala.collection.immutable.Iterable<T>>> f) |
Flow<In,Out,NotUsed> |
subFlow() |
static FlowOps |
take(long n) |
static FlowOps |
takeWhile(scala.Function1<Out,java.lang.Object> p) |
static FlowOps |
takeWhile(scala.Function1<Out,java.lang.Object> p,
boolean inclusive) |
static FlowOps |
takeWithin(scala.concurrent.duration.FiniteDuration d) |
static FlowOps |
throttle(int cost,
scala.concurrent.duration.FiniteDuration per,
int maximumBurst,
scala.Function1<Out,java.lang.Object> costCalculation,
ThrottleMode mode) |
static FlowOps |
throttle(int elements,
scala.concurrent.duration.FiniteDuration per,
int maximumBurst,
ThrottleMode mode) |
<M> C |
to(Graph<SinkShape<Out>,M> sink)
Attach a
Sink to each sub-flow, closing the overall Graph that is being
constructed. |
static <T> FlowOps |
transform(scala.Function0<Stage<Out,T>> mkStage) |
<T,Mat2> SubFlow<T,Mat,F,C> |
via(Graph<FlowShape<Out,T>,Mat2> flow) |
SubFlow<Out,Mat,F,C> |
withAttributes(Attributes attr) |
static <U> FlowOps |
zip(Graph<SourceShape<U>,?> that) |
protected static <U,M> Graph<FlowShape<Out,scala.Tuple2<Out,U>>,M> |
zipGraph(Graph<SourceShape<U>,M> that) |
static <Out2,Out3> |
zipWith(Graph<SourceShape<Out2>,?> that,
scala.Function2<Out,Out2,Out3> combine) |
protected static <Out2,Out3,M> |
zipWithGraph(Graph<SourceShape<Out2>,M> that,
scala.Function2<Out,Out2,Out3> combine) |
static FlowOps |
zipWithIndex() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
concatSubstreams, mergeSubstreams
alsoTo, alsoToGraph, andThen, 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, orElse, orElseGraph, prefixAndTail, prepend, prependGraph, recover, recoverWith, recoverWithRetries, reduce, scan, scanAsync, sliding, splitAfter, splitAfter, splitWhen, splitWhen, statefulMapConcat, take, takeWhile, takeWhile, takeWithin, throttle, throttle, transform, zip, zipGraph, zipWith, zipWithGraph, zipWithIndex
public static <T> FlowOps recover(scala.PartialFunction<java.lang.Throwable,T> pf)
public static <T> FlowOps recoverWith(scala.PartialFunction<java.lang.Throwable,Graph<SourceShape<T>,NotUsed>> pf)
public static <T> FlowOps recoverWithRetries(int attempts, scala.PartialFunction<java.lang.Throwable,Graph<SourceShape<T>,NotUsed>> pf)
public static FlowOps mapError(scala.PartialFunction<java.lang.Throwable,java.lang.Throwable> pf)
public static <T> FlowOps map(scala.Function1<Out,T> f)
public static <T> FlowOps mapConcat(scala.Function1<Out,scala.collection.immutable.Iterable<T>> f)
public static <T> FlowOps statefulMapConcat(scala.Function0<scala.Function1<Out,scala.collection.immutable.Iterable<T>>> f)
public static <T> FlowOps mapAsync(int parallelism, scala.Function1<Out,scala.concurrent.Future<T>> f)
public static <T> FlowOps mapAsyncUnordered(int parallelism, scala.Function1<Out,scala.concurrent.Future<T>> f)
public static FlowOps filter(scala.Function1<Out,java.lang.Object> p)
public static FlowOps filterNot(scala.Function1<Out,java.lang.Object> p)
public static FlowOps takeWhile(scala.Function1<Out,java.lang.Object> p)
public static FlowOps takeWhile(scala.Function1<Out,java.lang.Object> p, boolean inclusive)
public static FlowOps dropWhile(scala.Function1<Out,java.lang.Object> p)
public static <T> FlowOps collect(scala.PartialFunction<Out,T> pf)
public static FlowOps grouped(int n)
public static FlowOps limit(long max)
public static <T> FlowOps limitWeighted(long max, scala.Function1<Out,java.lang.Object> costFn)
public static FlowOps sliding(int n, int step)
public static <T> FlowOps scan(T zero, scala.Function2<T,Out,T> f)
public static <T> FlowOps scanAsync(T zero, scala.Function2<T,Out,scala.concurrent.Future<T>> f)
public static <T> FlowOps fold(T zero, scala.Function2<T,Out,T> f)
public static <T> FlowOps foldAsync(T zero, scala.Function2<T,Out,scala.concurrent.Future<T>> f)
public static <T> FlowOps reduce(scala.Function2<T,T,T> f)
public static <T> FlowOps intersperse(T start, T inject, T end)
public static <T> FlowOps intersperse(T inject)
public static FlowOps groupedWithin(int n, scala.concurrent.duration.FiniteDuration d)
public static FlowOps delay(scala.concurrent.duration.FiniteDuration of, DelayOverflowStrategy strategy)
public static FlowOps drop(long n)
public static FlowOps dropWithin(scala.concurrent.duration.FiniteDuration d)
public static FlowOps take(long n)
public static FlowOps takeWithin(scala.concurrent.duration.FiniteDuration d)
public static <S> FlowOps conflateWithSeed(scala.Function1<Out,S> seed, scala.Function2<S,Out,S> aggregate)
public static <O2> FlowOps conflate(scala.Function2<O2,O2,O2> aggregate)
public static <S> FlowOps batch(long max, scala.Function1<Out,S> seed, scala.Function2<S,Out,S> aggregate)
public static <S> FlowOps batchWeighted(long max, scala.Function1<Out,java.lang.Object> costFn, scala.Function1<Out,S> seed, scala.Function2<S,Out,S> aggregate)
public static <U> FlowOps expand(scala.Function1<Out,scala.collection.Iterator<U>> extrapolate)
public static FlowOps buffer(int size, OverflowStrategy overflowStrategy)
public static <U> FlowOps prefixAndTail(int n)
public static <K> SubFlow<Out,Mat,FlowOps,java.lang.Object> groupBy(int maxSubstreams, scala.Function1<Out,K> f)
public static SubFlow<Out,Mat,FlowOps,java.lang.Object> splitWhen(SubstreamCancelStrategy substreamCancelStrategy, scala.Function1<Out,java.lang.Object> p)
public static SubFlow<Out,Mat,FlowOps,java.lang.Object> splitWhen(scala.Function1<Out,java.lang.Object> p)
public static SubFlow<Out,Mat,FlowOps,java.lang.Object> splitAfter(SubstreamCancelStrategy substreamCancelStrategy, scala.Function1<Out,java.lang.Object> p)
public static SubFlow<Out,Mat,FlowOps,java.lang.Object> splitAfter(scala.Function1<Out,java.lang.Object> p)
public static <T,M> FlowOps flatMapConcat(scala.Function1<Out,Graph<SourceShape<T>,M>> f)
public static <T,M> FlowOps flatMapMerge(int breadth, scala.Function1<Out,Graph<SourceShape<T>,M>> f)
public static FlowOps initialTimeout(scala.concurrent.duration.FiniteDuration timeout)
public static FlowOps completionTimeout(scala.concurrent.duration.FiniteDuration timeout)
public static FlowOps idleTimeout(scala.concurrent.duration.FiniteDuration timeout)
public static FlowOps backpressureTimeout(scala.concurrent.duration.FiniteDuration timeout)
public static <U> FlowOps keepAlive(scala.concurrent.duration.FiniteDuration maxIdle, scala.Function0<U> injectedElem)
public static FlowOps throttle(int elements, scala.concurrent.duration.FiniteDuration per, int maximumBurst, ThrottleMode mode)
public static FlowOps throttle(int cost, scala.concurrent.duration.FiniteDuration per, int maximumBurst, scala.Function1<Out,java.lang.Object> costCalculation, ThrottleMode mode)
public static FlowOps detach()
public static FlowOps initialDelay(scala.concurrent.duration.FiniteDuration delay)
public static FlowOps log(java.lang.String name, scala.Function1<Out,java.lang.Object> extract, LoggingAdapter log)
public static <U> FlowOps zip(Graph<SourceShape<U>,?> that)
protected static <U,M> Graph<FlowShape<Out,scala.Tuple2<Out,U>>,M> zipGraph(Graph<SourceShape<U>,M> that)
public static <Out2,Out3> FlowOps zipWith(Graph<SourceShape<Out2>,?> that, scala.Function2<Out,Out2,Out3> combine)
protected static <Out2,Out3,M> Graph<FlowShape<Out,Out3>,M> zipWithGraph(Graph<SourceShape<Out2>,M> that, scala.Function2<Out,Out2,Out3> combine)
public static FlowOps zipWithIndex()
public static <U> FlowOps interleave(Graph<SourceShape<U>,?> that, int segmentSize)
protected static <U,M> Graph<FlowShape<Out,U>,M> interleaveGraph(Graph<SourceShape<U>,M> that, int segmentSize)
public static <U,M> FlowOps merge(Graph<SourceShape<U>,M> that, boolean eagerComplete)
protected static <U,M> Graph<FlowShape<Out,U>,M> mergeGraph(Graph<SourceShape<U>,M> that, boolean eagerComplete)
public static <U,M> FlowOps mergeSorted(Graph<SourceShape<U>,M> that, scala.math.Ordering<U> ord)
protected static <U,M> Graph<FlowShape<Out,U>,M> mergeSortedGraph(Graph<SourceShape<U>,M> that, scala.math.Ordering<U> ord)
public static <U,Mat2> FlowOps concat(Graph<SourceShape<U>,Mat2> that)
protected static <U,Mat2> Graph<FlowShape<Out,U>,Mat2> concatGraph(Graph<SourceShape<U>,Mat2> that)
public static <U,Mat2> FlowOps prepend(Graph<SourceShape<U>,Mat2> that)
protected static <U,Mat2> Graph<FlowShape<Out,U>,Mat2> prependGraph(Graph<SourceShape<U>,Mat2> that)
public static <U,Mat2> FlowOps orElse(Graph<SourceShape<U>,Mat2> secondary)
protected static <U,Mat2> Graph<FlowShape<Out,U>,Mat2> orElseGraph(Graph<SourceShape<U>,Mat2> secondary)
public static <U,M> FlowOps $plus$plus(Graph<SourceShape<U>,M> that)
protected static <M> Graph<FlowShape<Out,Out>,M> alsoToGraph(Graph<SinkShape<Out>,M> that)
public static <T> FlowOps andThen(Stages.SymbolicStage<Out,T> op)
public static int sliding$default$2()
public static DelayOverflowStrategy delay$default$2()
public static <U,M> boolean merge$default$2()
public static scala.Function1<Out,java.lang.Object> log$default$2()
public static LoggingAdapter log$default$3(java.lang.String name, scala.Function1<Out,java.lang.Object> extract)
public static F mergeSubstreams()
public static F concatSubstreams()
public SubFlow<Out,Mat,F,C> withAttributes(Attributes attr)
withAttributes
in interface FlowOps<Out,Mat>
public SubFlow<Out,Mat,F,C> addAttributes(Attributes attr)
addAttributes
in interface FlowOps<Out,Mat>
public SubFlow<Out,Mat,F,C> async()
FlowOps
Flow
.
If this is a SubFlow
(created e.g. by groupBy
), this creates an
asynchronous boundary around each materialized sub-flow, not the
super-flow. That way, the super-flow will communicate with sub-flows
asynchronously.
public F mergeSubstreamsWithParallelism(int breadth)
SubFlow
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.