Class FlowableWindowBoundarySelector.WindowBoundaryMainSubscriber<T,​B,​V>

  • All Implemented Interfaces:
    FlowableSubscriber<T>, java.io.Serializable, java.lang.Runnable, org.reactivestreams.Subscriber<T>, org.reactivestreams.Subscription
    Enclosing class:
    FlowableWindowBoundarySelector<T,​B,​V>

    static final class FlowableWindowBoundarySelector.WindowBoundaryMainSubscriber<T,​B,​V>
    extends java.util.concurrent.atomic.AtomicInteger
    implements FlowableSubscriber<T>, org.reactivestreams.Subscription, java.lang.Runnable
    • Field Detail

      • downstream

        final org.reactivestreams.Subscriber<? super Flowable<T>> downstream
      • open

        final org.reactivestreams.Publisher<B> open
      • closingIndicator

        final Function<? super B,​? extends org.reactivestreams.Publisher<V>> closingIndicator
      • bufferSize

        final int bufferSize
      • windowCount

        final java.util.concurrent.atomic.AtomicLong windowCount
      • downstreamCancelled

        final java.util.concurrent.atomic.AtomicBoolean downstreamCancelled
      • requested

        final java.util.concurrent.atomic.AtomicLong requested
      • emitted

        long emitted
      • upstreamCanceled

        volatile boolean upstreamCanceled
      • upstreamDone

        volatile boolean upstreamDone
      • openDone

        volatile boolean openDone
      • upstream

        org.reactivestreams.Subscription upstream
    • Constructor Detail

      • WindowBoundaryMainSubscriber

        WindowBoundaryMainSubscriber​(org.reactivestreams.Subscriber<? super Flowable<T>> actual,
                                     org.reactivestreams.Publisher<B> open,
                                     Function<? super B,​? extends org.reactivestreams.Publisher<V>> closingIndicator,
                                     int bufferSize)
    • Method Detail

      • onSubscribe

        public void onSubscribe​(org.reactivestreams.Subscription s)
        Description copied from interface: FlowableSubscriber
        Implementors of this method should make sure everything that needs to be visible in Subscriber.onNext(Object) is established before calling Subscription.request(long). In practice this means no initialization should happen after the request() call and additional behavior is thread safe in respect to onNext.
        Specified by:
        onSubscribe in interface FlowableSubscriber<T>
        Specified by:
        onSubscribe in interface org.reactivestreams.Subscriber<T>
      • onNext

        public void onNext​(T t)
        Specified by:
        onNext in interface org.reactivestreams.Subscriber<T>
      • onError

        public void onError​(java.lang.Throwable t)
        Specified by:
        onError in interface org.reactivestreams.Subscriber<T>
      • onComplete

        public void onComplete()
        Specified by:
        onComplete in interface org.reactivestreams.Subscriber<T>
      • 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
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • open

        void open​(B startValue)
      • openError

        void openError​(java.lang.Throwable t)
      • openComplete

        void openComplete()
      • closeError

        void closeError​(java.lang.Throwable t)
      • drain

        void drain()
      • terminateDownstream

        void terminateDownstream​(org.reactivestreams.Subscriber<?> downstream)