Class MultiFlatMapOp.FlatMapMainSubscriber<I,​O>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.concurrent.atomic.AtomicReference<T[]> inners  
    • Constructor Summary

      Constructors 
      Constructor Description
      FlatMapMainSubscriber​(MultiSubscriber<? super O> downstream, java.util.function.Function<? super I,​? extends org.reactivestreams.Publisher<? extends O>> mapper, boolean delayError, int concurrency, java.util.function.Supplier<? extends java.util.Queue<O>> mainQueueSupplier, int requests)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()  
      Context context()
      Provide a context.
      void onCompletion()
      Method called when the upstream emits a completion terminal event.
      void onFailure​(java.lang.Throwable failure)
      Method called when the upstream emits a failure terminal event.
      void onItem​(I item)
      Method called when the upstream emits an item event, in response to to requests to Subscription.request(long).
      void onSubscribe​(org.reactivestreams.Subscription s)  
      void request​(long n)  
      • Methods inherited from class java.lang.Object

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

      • inners

        protected java.util.concurrent.atomic.AtomicReference<T[]> inners
    • Constructor Detail

      • FlatMapMainSubscriber

        public FlatMapMainSubscriber​(MultiSubscriber<? super O> downstream,
                                     java.util.function.Function<? super I,​? extends org.reactivestreams.Publisher<? extends O>> mapper,
                                     boolean delayError,
                                     int concurrency,
                                     java.util.function.Supplier<? extends java.util.Queue<O>> mainQueueSupplier,
                                     int requests)
    • Method Detail

      • request

        public void request​(long n)
        Specified by:
        request in interface org.reactivestreams.Subscription
      • cancel

        public void cancel()
        Specified by:
        cancel in interface org.reactivestreams.Subscription
      • onSubscribe

        public void onSubscribe​(org.reactivestreams.Subscription s)
        Specified by:
        onSubscribe in interface org.reactivestreams.Subscriber<I>
      • onItem

        public void onItem​(I item)
        Description copied from interface: MultiSubscriber
        Method called when the upstream emits an item event, in response to to requests to Subscription.request(long).
        Specified by:
        onItem in interface MultiSubscriber<I>
        Parameters:
        item - the item, must not be null.
      • onFailure

        public void onFailure​(java.lang.Throwable failure)
        Description copied from interface: MultiSubscriber
        Method called when the upstream emits a failure terminal event.

        No further events will be sent even if Subscription.request(long) is invoked again.

        Specified by:
        onFailure in interface MultiSubscriber<I>
        Parameters:
        failure - the failure, must not be null.
      • onCompletion

        public void onCompletion()
        Description copied from interface: MultiSubscriber
        Method called when the upstream emits a completion terminal event.

        No further events will be sent even if Subscription.request(long) is invoked again.

        Specified by:
        onCompletion in interface MultiSubscriber<I>
      • context

        public Context context()
        Description copied from interface: ContextSupport
        Provide a context.

        Since calls to this method shall only be triggered when a Mutiny pipeline uses a withContext operator, there is no need in general for caching the context value in a field of the implementing class. Exceptions include operators that have cross-subscriber semantics such as memoizers or broadcasters.

        This method is expected to be called once per withContext operator.

        Specified by:
        context in interface ContextSupport
        Returns:
        the context, must not be null.