Package akka.stream.javadsl
Class JavaFlowSupport.Sink
- java.lang.Object
-
- akka.stream.javadsl.JavaFlowSupport.Sink
-
- Enclosing class:
- JavaFlowSupport
public static final class JavaFlowSupport.Sink extends java.lang.Object
Sink
factories operating withjava.util.concurrent.Flow.*
interfaces.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Sink<T,java.util.concurrent.Flow.Publisher<T>>
asPublisher(AsPublisher fanout)
A `Sink` that materializes into aFlow.Publisher
.static <T> Sink<T,NotUsed>
fromSubscriber(java.util.concurrent.Flow.Subscriber<T> s)
Helper to create <> from < >.
-
-
-
Method Detail
-
asPublisher
public static <T> Sink<T,java.util.concurrent.Flow.Publisher<T>> asPublisher(AsPublisher fanout)
A `Sink` that materializes into aFlow.Publisher
.If
fanout
isWITH_FANOUT
, the materializedPublisher
will support multipleSubscriber
s and the size of theinputBuffer
configured for this operator becomes the maximum number of elements that the fastestFlow.Subscriber
can be ahead of the slowest one before slowing the processing down due to back pressure.If
fanout
isWITHOUT_FANOUT
then the materializedPublisher
will only support a singleSubscriber
and reject any additionalSubscriber
s.
-
-