Class FlowableOperatorReadAhead.SubscriberImpl

java.lang.Object
org.aksw.commons.rx.op.FlowableOperatorReadAhead.SubscriberImpl
All Implemented Interfaces:
io.reactivex.rxjava3.core.FlowableSubscriber<T>, org.reactivestreams.Subscriber<T>, org.reactivestreams.Subscription
Enclosing class:
FlowableOperatorReadAhead<T>

public class FlowableOperatorReadAhead.SubscriberImpl extends Object implements io.reactivex.rxjava3.core.FlowableSubscriber<T>, org.reactivestreams.Subscription
  • Field Details

    • downstream

      protected org.reactivestreams.Subscriber<? super T> downstream
    • upstream

      protected org.reactivestreams.Subscription upstream
    • isUpstreamCompleted

      protected boolean isUpstreamCompleted
    • queue

      protected Deque<T> queue
    • downstreamDemand

      protected AtomicLong downstreamDemand
    • readAheadCapacity

      protected AtomicInteger readAheadCapacity
  • Constructor Details

    • SubscriberImpl

      public SubscriberImpl(org.reactivestreams.Subscriber<? super T> downstream)
  • Method Details

    • onSubscribe

      public void onSubscribe(org.reactivestreams.Subscription s)
      Specified by:
      onSubscribe in interface io.reactivex.rxjava3.core.FlowableSubscriber<T>
      Specified by:
      onSubscribe in interface org.reactivestreams.Subscriber<T>
    • drain

      protected void drain()
      From the queue send out as many items as requested
    • onNext

      public void onNext(T item)
      Specified by:
      onNext in interface org.reactivestreams.Subscriber<T>
    • onComplete

      public void onComplete()
      Called when the upstream completes
      Specified by:
      onComplete in interface org.reactivestreams.Subscriber<T>
    • onError

      public void onError(Throwable t)
      Specified by:
      onError 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