Class JavaFlowSupport.Sink

  • Enclosing class:
    JavaFlowSupport

    public static final class JavaFlowSupport.Sink
    extends java.lang.Object
    Sink factories operating with java.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 a Flow.Publisher.
      static <T> Sink<T,​NotUsed> fromSubscriber​(java.util.concurrent.Flow.Subscriber<T> s)
      Helper to create <> from <>.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • asPublisher

        public static <T> Sink<T,​java.util.concurrent.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​(java.util.concurrent.Flow.Subscriber<T> s)
        Helper to create <> from <>.