Class JavaFlowSupport.Sink

java.lang.Object
org.apache.pekko.stream.javadsl.JavaFlowSupport.Sink
Enclosing class:
JavaFlowSupport

public static final class JavaFlowSupport.Sink extends Object
Sink factories operating with java.util.concurrent.Flow.* interfaces.
  • Method Details

    • asPublisher

      public static <T> Sink<T,Flow.Publisher<T>> asPublisher(AsPublisher fanout)
      A `Sink` that materializes into a Flow.Publisher.

      If fanout is WITH_FANOUT, the materialized Publisher will support multiple Subscribers and the size of the inputBuffer configured for this operator becomes the maximum number of elements that the fastest Flow.Subscriber can be ahead of the slowest one before slowing the processing down due to back pressure.

      If fanout is WITHOUT_FANOUT then the materialized Publisher will only support a single Subscriber and reject any additional Subscribers.

    • fromSubscriber

      public static <T> Sink<T,NotUsed> fromSubscriber(Flow.Subscriber<T> s)
      Helper to create <> from <<java.util.concurrent.Flow.Subscriber>>.