Class FlowableCache.CacheSubscription<T>

java.lang.Object
java.lang.Number
java.util.concurrent.atomic.AtomicInteger
io.reactivex.rxjava3.internal.operators.flowable.FlowableCache.CacheSubscription<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
Serializable, org.reactivestreams.Subscription
Enclosing class:
FlowableCache<T>

static final class FlowableCache.CacheSubscription<T> extends AtomicInteger implements org.reactivestreams.Subscription
Hosts the downstream consumer and its current requested and replay states. this holds the work-in-progress counter for the serialized replay.
  • Field Details

  • Constructor Details

    • CacheSubscription

      CacheSubscription(org.reactivestreams.Subscriber<? super T> downstream, FlowableCache<T> parent)
      Constructs a new instance with the actual downstream consumer and the parent cache object.
      Parameters:
      downstream - the actual consumer
      parent - the parent that holds onto the cached items
  • Method Details

    • 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