Package io.reactivex.rxjava3.processors
Class PublishProcessor.PublishSubscription<T>
- java.lang.Object
-
- java.lang.Number
-
- java.util.concurrent.atomic.AtomicLong
-
- io.reactivex.rxjava3.processors.PublishProcessor.PublishSubscription<T>
-
- Type Parameters:
T
- the value type
- All Implemented Interfaces:
java.io.Serializable
,org.reactivestreams.Subscription
- Enclosing class:
- PublishProcessor<T>
static final class PublishProcessor.PublishSubscription<@NonNull T> extends java.util.concurrent.atomic.AtomicLong implements org.reactivestreams.Subscription
Wraps the actual subscriber, tracks its requests and makes cancellation to remove itself from the current subscribers array.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) org.reactivestreams.Subscriber<? super T>
downstream
The actual subscriber.(package private) PublishProcessor<T>
parent
The parent processor servicing this subscriber.private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description PublishSubscription(org.reactivestreams.Subscriber<? super @NonNull T> actual, PublishProcessor<@NonNull T> parent)
Constructs a PublishSubscriber, wraps the actual subscriber and the state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
boolean
isCancelled()
(package private) boolean
isFull()
void
onComplete()
void
onError(java.lang.Throwable t)
void
onNext(@NonNull T t)
void
request(long n)
-
Methods inherited from class java.util.concurrent.atomic.AtomicLong
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
The actual subscriber.
-
parent
final PublishProcessor<T> parent
The parent processor servicing this subscriber.
-
-
Constructor Detail
-
PublishSubscription
PublishSubscription(org.reactivestreams.Subscriber<? super @NonNull T> actual, PublishProcessor<@NonNull T> parent)
Constructs a PublishSubscriber, wraps the actual subscriber and the state.- Parameters:
actual
- the actual subscriberparent
- the parent PublishProcessor
-
-
Method Detail
-
onError
public void onError(java.lang.Throwable t)
-
onComplete
public void onComplete()
-
request
public void request(long n)
- Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()
- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-
isCancelled
public boolean isCancelled()
-
isFull
boolean isFull()
-
-