public final class Flow<In,Out,Mat> extends java.lang.Object implements FlowOpsMat<Out,Mat>, Graph<FlowShape<In,Out>,Mat>
Flow
is a set of stream processing steps that has one open input and one open output.Constructor and Description |
---|
Flow(StreamLayout.Module module) |
Modifier and Type | Method and Description |
---|---|
static <U,M> FlowOps |
$plus$plus(Graph<SourceShape<U>,M> that) |
Flow<In,Out,Mat> |
addAttributes(Attributes attr)
Add the given attributes to this Flow.
|
static FlowOps |
alsoTo(Graph<SinkShape<Out>,?> that) |
protected static <M> Graph<FlowShape<Out,Out>,M> |
alsoToGraph(Graph<SinkShape<Out>,M> that) |
static <Mat2,Mat3> |
alsoToMat(Graph<SinkShape<Out>,Mat2> that,
scala.Function2<Mat,Mat2,Mat3> matF) |
static <T> FlowOps |
andThen(Stages.SymbolicStage<Out,T> op) |
static <T> Flow<T,T,NotUsed> |
apply()
Returns a
Flow which outputs all its inputs. |
Flow<In,Out,Mat> |
asJava()
Converts this Scala DSL element to it's Java DSL counterpart.
|
Flow<In,Out,Mat> |
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 <U,Mat2,Mat3> |
concatMat(Graph<SourceShape<U>,Mat2> that,
scala.Function2<Mat,Mat2,Mat3> matF) |
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 <A,B> Flow<A,B,NotUsed> |
fromFunction(scala.Function1<A,B> f)
Creates a [Flow] which will use the given function to transform its inputs to outputs.
|
static <I,O,M> Flow<I,O,M> |
fromGraph(Graph<FlowShape<I,O>,M> g)
A graph with the shape of a flow logically is a flow, this method makes
it so also in type.
|
static <I,O> Flow<I,O,NotUsed> |
fromProcessor(scala.Function0<org.reactivestreams.Processor<I,O>> processorFactory)
Creates a Flow from a Reactive Streams
Processor |
static <I,O,M> Flow<I,O,M> |
fromProcessorMat(scala.Function0<scala.Tuple2<org.reactivestreams.Processor<I,O>,M>> processorFactory)
Creates a Flow from a Reactive Streams
Processor and returns a materialized value. |
static <I,O> Flow<I,O,NotUsed> |
fromSinkAndSource(Graph<SinkShape<I>,?> sink,
Graph<SourceShape<O>,?> source)
Creates a
Flow from a Sink and a Source where the Flow's input
will be sent to the Sink and the Flow's output will come from the Source. |
static <I,O,M1,M2,M> |
fromSinkAndSourceMat(Graph<SinkShape<I>,M1> sink,
Graph<SourceShape<O>,M2> source,
scala.Function2<M1,M2,M> combine)
Creates a
Flow from a Sink and a Source where the Flow's input
will be sent to the Sink and the Flow's output will come from the Source. |
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 <U,Mat2,Mat3> |
interleaveMat(Graph<SourceShape<U>,Mat2> that,
int request,
scala.Function2<Mat,Mat2,Mat3> matF) |
static <T> FlowOps |
intersperse(T inject) |
static <T> FlowOps |
intersperse(T start,
T inject,
T end) |
boolean |
isIdentity() |
<I2,O2,Mat2> |
join(Graph<BidiShape<Out,O2,I2,In>,Mat2> bidi)
|
<Mat2> RunnableGraph<Mat> |
join(Graph<FlowShape<Out,In>,Mat2> flow)
Join this
Flow to another Flow , by cross connecting the inputs and outputs, creating a RunnableGraph . |
<I2,O2,Mat2,M> |
joinMat(Graph<BidiShape<Out,O2,I2,In>,Mat2> bidi,
scala.Function2<Mat,Mat2,M> combine)
|
<Mat2,Mat3> |
joinMat(Graph<FlowShape<Out,In>,Mat2> flow,
scala.Function2<Mat,Mat2,Mat3> combine)
Join this
Flow to another Flow , by cross connecting the inputs and outputs, creating a RunnableGraph |
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) |
<Mat2> Flow<In,Out,Mat2> |
mapMaterializedValue(scala.Function1<Mat,Mat2> f)
Transform the materialized value of this Flow, leaving all other properties as they were.
|
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,Mat2,Mat3> |
mergeMat(Graph<SourceShape<U>,Mat2> that,
boolean eagerComplete,
scala.Function2<Mat,Mat2,Mat3> matF) |
static <U,Mat2,Mat3> |
mergeMat$default$2() |
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 <U,Mat2,Mat3> |
mergeSortedMat(Graph<SourceShape<U>,Mat2> that,
scala.Function2<Mat,Mat2,Mat3> matF,
scala.math.Ordering<U> ord) |
StreamLayout.Module |
module()
INTERNAL API.
|
static <Mat2> FlowOpsMat |
monitor(scala.Function2<Mat,FlowMonitor<Out>,Mat2> combine) |
Flow<In,Out,Mat> |
named(java.lang.String name)
Add a
name attribute to this Flow. |
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,Mat2,Mat3> |
orElseMat(Graph<SourceShape<U>,Mat2> secondary,
scala.Function2<Mat,Mat2,Mat3> matF) |
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 <U,Mat2,Mat3> |
prependMat(Graph<SourceShape<U>,Mat2> that,
scala.Function2<Mat,Mat2,Mat3> matF) |
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) |
<Mat1,Mat2> |
runWith(Graph<SourceShape<In>,Mat1> source,
Graph<SinkShape<Out>,Mat2> sink,
Materializer materializer)
Connect the
Source to this Flow and then connect it to the Sink and run it. |
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) |
FlowShape<In,Out> |
shape()
The shape of a graph is all that is externally visible: its inlets and outlets.
|
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) |
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) |
<Mat2> Sink<In,Mat> |
to(Graph<SinkShape<Out>,Mat2> sink)
|
<Mat2,Mat3> |
toMat(Graph<SinkShape<Out>,Mat2> sink,
scala.Function2<Mat,Mat2,Mat3> combine)
|
RunnableGraph<org.reactivestreams.Processor<In,Out>> |
toProcessor()
Converts this Flow to a
RunnableGraph that materializes to a Reactive Streams Processor
which implements the operations encapsulated by this Flow. |
java.lang.String |
toString() |
static <T> FlowOps |
transform(scala.Function0<Stage<Out,T>> mkStage) |
static <T,M> FlowOpsMat |
transformMaterializing(scala.Function0<scala.Tuple2<Stage<Out,T>,M>> mkStageAndMaterialized) |
<T,Mat2> Flow<In,T,Mat> |
via(Graph<FlowShape<Out,T>,Mat2> flow) |
<T,Mat2,Mat3> |
viaMat(Graph<FlowShape<Out,T>,Mat2> flow,
scala.Function2<Mat,Mat2,Mat3> combine)
Transform this
Flow by appending the given processing steps. |
static <Mat2> FlowOpsMat |
watchTermination(scala.Function2<Mat,scala.concurrent.Future<Done>,Mat2> matF) |
Flow<In,Out,Mat> |
withAttributes(Attributes attr)
Change the attributes of this
Flow to the given ones and seal the list
of attributes. |
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 <U,Mat2,Mat3> |
zipMat(Graph<SourceShape<U>,Mat2> that,
scala.Function2<Mat,Mat2,Mat3> matF) |
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() |
static <Out2,Out3,Mat2,Mat3> |
zipWithMat(Graph<SourceShape<Out2>,Mat2> that,
scala.Function2<Out,Out2,Out3> combine,
scala.Function2<Mat,Mat2,Mat3> matF) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
alsoToMat, concatMat, interleaveMat, mergeMat, mergeSortedMat, monitor, orElseMat, prependMat, transformMaterializing, watchTermination, zipMat, zipWithMat
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 Flow(StreamLayout.Module module)
public static <I,O> Flow<I,O,NotUsed> fromProcessor(scala.Function0<org.reactivestreams.Processor<I,O>> processorFactory)
Processor
processorFactory
- (undocumented)public static <I,O,M> Flow<I,O,M> fromProcessorMat(scala.Function0<scala.Tuple2<org.reactivestreams.Processor<I,O>,M>> processorFactory)
Processor
and returns a materialized value.processorFactory
- (undocumented)public static <T> Flow<T,T,NotUsed> apply()
Flow
which outputs all its inputs.public static <A,B> Flow<A,B,NotUsed> fromFunction(scala.Function1<A,B> f)
Flow[T].map(f)
f
- (undocumented)public static <I,O,M> Flow<I,O,M> fromGraph(Graph<FlowShape<I,O>,M> g)
g
- (undocumented)public static <I,O> Flow<I,O,NotUsed> fromSinkAndSource(Graph<SinkShape<I>,?> sink, Graph<SourceShape<O>,?> source)
Flow
from a Sink
and a Source
where the Flow's input
will be sent to the Sink and the Flow's output will come from the Source.sink
- (undocumented)source
- (undocumented)public static <I,O,M1,M2,M> Flow<I,O,M> fromSinkAndSourceMat(Graph<SinkShape<I>,M1> sink, Graph<SourceShape<O>,M2> source, scala.Function2<M1,M2,M> combine)
Flow
from a Sink
and a Source
where the Flow's input
will be sent to the Sink and the Flow's output will come from the Source.
The combine
function is used to compose the materialized values of the sink
and source
into the materialized value of the resulting Flow
.
sink
- (undocumented)source
- (undocumented)combine
- (undocumented)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 <U,Mat2,Mat3> FlowOpsMat zipMat(Graph<SourceShape<U>,Mat2> that, scala.Function2<Mat,Mat2,Mat3> matF)
public static <Out2,Out3,Mat2,Mat3> FlowOpsMat zipWithMat(Graph<SourceShape<Out2>,Mat2> that, scala.Function2<Out,Out2,Out3> combine, scala.Function2<Mat,Mat2,Mat3> matF)
public static <U,Mat2,Mat3> FlowOpsMat mergeMat(Graph<SourceShape<U>,Mat2> that, boolean eagerComplete, scala.Function2<Mat,Mat2,Mat3> matF)
public static <U,Mat2,Mat3> FlowOpsMat interleaveMat(Graph<SourceShape<U>,Mat2> that, int request, scala.Function2<Mat,Mat2,Mat3> matF)
public static <U,Mat2,Mat3> FlowOpsMat mergeSortedMat(Graph<SourceShape<U>,Mat2> that, scala.Function2<Mat,Mat2,Mat3> matF, scala.math.Ordering<U> ord)
public static <U,Mat2,Mat3> FlowOpsMat concatMat(Graph<SourceShape<U>,Mat2> that, scala.Function2<Mat,Mat2,Mat3> matF)
public static <U,Mat2,Mat3> FlowOpsMat prependMat(Graph<SourceShape<U>,Mat2> that, scala.Function2<Mat,Mat2,Mat3> matF)
public static <U,Mat2,Mat3> FlowOpsMat orElseMat(Graph<SourceShape<U>,Mat2> secondary, scala.Function2<Mat,Mat2,Mat3> matF)
public static <Mat2,Mat3> FlowOpsMat alsoToMat(Graph<SinkShape<Out>,Mat2> that, scala.Function2<Mat,Mat2,Mat3> matF)
public static <Mat2> FlowOpsMat watchTermination(scala.Function2<Mat,scala.concurrent.Future<Done>,Mat2> matF)
public static <Mat2> FlowOpsMat monitor(scala.Function2<Mat,FlowMonitor<Out>,Mat2> combine)
public static <T,M> FlowOpsMat transformMaterializing(scala.Function0<scala.Tuple2<Stage<Out,T>,M>> mkStageAndMaterialized)
public static <U,Mat2,Mat3> boolean mergeMat$default$2()
public StreamLayout.Module module()
Graph
Every materializable element must be backed by a stream layout module
public FlowShape<In,Out> shape()
Graph
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isIdentity()
public <T,Mat2,Mat3> Flow<In,T,Mat3> viaMat(Graph<FlowShape<Out,T>,Mat2> flow, scala.Function2<Mat,Mat2,Mat3> combine)
FlowOpsMat
Flow
by appending the given processing steps.
+----------------------------+
| Resulting Flow |
| |
| +------+ +------+ |
| | | | | |
In ~~> | this | ~Out~> | flow | ~~> T
| | | | | |
| +------+ +------+ |
+----------------------------+
The combine
function is used to compose the materialized values of this flow and that
flow into the materialized value of the resulting Flow.
It is recommended to use the internally optimized Keep.left
and Keep.right
combiners
where appropriate instead of manually writing functions that pass through one of the values.
viaMat
in interface FlowOpsMat<Out,Mat>
flow
- (undocumented)combine
- (undocumented)public <Mat2> Sink<In,Mat> to(Graph<SinkShape<Out>,Mat2> sink)
Flow
to a Sink
, concatenating the processing steps of both.
+----------------------------+
| Resulting Sink |
| |
| +------+ +------+ |
| | | | | |
In ~~> | flow | ~Out~> | sink | |
| | | | | |
| +------+ +------+ |
+----------------------------+
The materialized value of the combined Sink
will be the materialized
value of the current flow (ignoring the given Sink’s value), use
toMat
if a different strategy is needed.public <Mat2,Mat3> Sink<In,Mat3> toMat(Graph<SinkShape<Out>,Mat2> sink, scala.Function2<Mat,Mat2,Mat3> combine)
Flow
to a Sink
, concatenating the processing steps of both.
+----------------------------+
| Resulting Sink |
| |
| +------+ +------+ |
| | | | | |
In ~~> | flow | ~Out~> | sink | |
| | | | | |
| +------+ +------+ |
+----------------------------+
The combine
function is used to compose the materialized values of this flow and that
Sink into the materialized value of the resulting Sink.
It is recommended to use the internally optimized Keep.left
and Keep.right
combiners
where appropriate instead of manually writing functions that pass through one of the values.
toMat
in interface FlowOpsMat<Out,Mat>
sink
- (undocumented)combine
- (undocumented)public <Mat2> Flow<In,Out,Mat2> mapMaterializedValue(scala.Function1<Mat,Mat2> f)
mapMaterializedValue
in interface FlowOpsMat<Out,Mat>
f
- (undocumented)public <Mat2> RunnableGraph<Mat> join(Graph<FlowShape<Out,In>,Mat2> flow)
Flow
to another Flow
, by cross connecting the inputs and outputs, creating a RunnableGraph
.
+------+ +-------+
| | ~Out~> | |
| this | | other |
| | <~In~ | |
+------+ +-------+
The materialized value of the combined Flow
will be the materialized
value of the current flow (ignoring the other Flow’s value), use
joinMat
if a different strategy is needed.flow
- (undocumented)public <Mat2,Mat3> RunnableGraph<Mat3> joinMat(Graph<FlowShape<Out,In>,Mat2> flow, scala.Function2<Mat,Mat2,Mat3> combine)
Flow
to another Flow
, by cross connecting the inputs and outputs, creating a RunnableGraph
+------+ +-------+
| | ~Out~> | |
| this | | other |
| | <~In~ | |
+------+ +-------+
The combine
function is used to compose the materialized values of this flow and that
Flow into the materialized value of the resulting Flow.
It is recommended to use the internally optimized Keep.left
and Keep.right
combiners
where appropriate instead of manually writing functions that pass through one of the values.
flow
- (undocumented)combine
- (undocumented)public <I2,O2,Mat2> Flow<I2,O2,Mat> join(Graph<BidiShape<Out,O2,I2,In>,Mat2> bidi)
Flow
to a BidiFlow
to close off the “top” of the protocol stack:
+---------------------------+
| Resulting Flow |
| |
| +------+ +------+ |
| | | ~Out~> | | ~~> O2
| | flow | | bidi | |
| | | <~In~ | | <~~ I2
| +------+ +------+ |
+---------------------------+
The materialized value of the combined Flow
will be the materialized
value of the current flow (ignoring the BidiFlow
’s value), use
joinMat
if a different strategy is needed.bidi
- (undocumented)public <I2,O2,Mat2,M> Flow<I2,O2,M> joinMat(Graph<BidiShape<Out,O2,I2,In>,Mat2> bidi, scala.Function2<Mat,Mat2,M> combine)
Flow
to a BidiFlow
to close off the “top” of the protocol stack:
+---------------------------+
| Resulting Flow |
| |
| +------+ +------+ |
| | | ~Out~> | | ~~> O2
| | flow | | bidi | |
| | | <~In~ | | <~~ I2
| +------+ +------+ |
+---------------------------+
The combine
function is used to compose the materialized values of this flow and that
BidiFlow
into the materialized value of the resulting Flow
.
It is recommended to use the internally optimized Keep.left
and Keep.right
combiners
where appropriate instead of manually writing functions that pass through one of the values.
bidi
- (undocumented)combine
- (undocumented)public Flow<In,Out,Mat> withAttributes(Attributes attr)
Flow
to the given ones and seal the list
of attributes. This means that further calls will not be able to remove these
attributes, but instead add new ones. Note that this
operation has no effect on an empty Flow (because the attributes apply
only to the contained processing stages).withAttributes
in interface Graph<FlowShape<In,Out>,Mat>
withAttributes
in interface FlowOps<Out,Mat>
attr
- (undocumented)public Flow<In,Out,Mat> addAttributes(Attributes attr)
withAttributes
will not remove these attributes. Note that this
operation has no effect on an empty Flow (because the attributes apply
only to the contained processing stages).addAttributes
in interface Graph<FlowShape<In,Out>,Mat>
addAttributes
in interface FlowOps<Out,Mat>
attr
- (undocumented)public <Mat1,Mat2> scala.Tuple2<Mat1,Mat2> runWith(Graph<SourceShape<In>,Mat1> source, Graph<SinkShape<Out>,Mat2> sink, Materializer materializer)
Source
to this Flow
and then connect it to the Sink
and run it. The returned tuple contains
the materialized values of the Source
and Sink
, e.g. the Subscriber
of a of a Source#subscriber
and
and Publisher
of a Sink#publisher
.source
- (undocumented)sink
- (undocumented)materializer
- (undocumented)public RunnableGraph<org.reactivestreams.Processor<In,Out>> toProcessor()
RunnableGraph
that materializes to a Reactive Streams Processor
which implements the operations encapsulated by this Flow. Every materialization results in a new Processor
instance, i.e. the returned RunnableGraph
is reusable.
RunnableGraph
that materializes to a Processor when run() is called on it.