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:
java.io.Serializable
,org.reactivestreams.Subscription
- Enclosing class:
- FlowableCache<T>
static final class FlowableCache.CacheSubscription<T> extends java.util.concurrent.atomic.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 Summary
Fields Modifier and Type Field Description (package private) org.reactivestreams.Subscriber<? super T>
downstream
(package private) long
index
(package private) FlowableCache.Node<T>
node
(package private) int
offset
(package private) FlowableCache<T>
parent
(package private) java.util.concurrent.atomic.AtomicLong
requested
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description CacheSubscription(org.reactivestreams.Subscriber<? super T> downstream, FlowableCache<T> parent)
Constructs a new instance with the actual downstream consumer and the parent cache object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
void
request(long n)
-
Methods inherited from class java.util.concurrent.atomic.AtomicInteger
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
downstream
final org.reactivestreams.Subscriber<? super T> downstream
-
parent
final FlowableCache<T> parent
-
requested
final java.util.concurrent.atomic.AtomicLong requested
-
node
FlowableCache.Node<T> node
-
offset
int offset
-
index
long index
-
-
Constructor Detail
-
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 consumerparent
- the parent that holds onto the cached items
-
-