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:
Serializable
,org.reactivestreams.Subscription
- Enclosing class:
PublishProcessor<T>
static final class PublishProcessor.PublishSubscription<@NonNull T>
extends 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
FieldsModifier and TypeFieldDescription(package private) final org.reactivestreams.Subscriber
<? super T> The actual subscriber.(package private) final PublishProcessor
<T> The parent processor servicing this subscriber.private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionPublishSubscription
(org.reactivestreams.Subscriber<? super @NonNull T> actual, PublishProcessor<@NonNull T> parent) Constructs a PublishSubscriber, wraps the actual subscriber and the state. -
Method Summary
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
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
downstream
The actual subscriber. -
parent
The parent processor servicing this subscriber.
-
-
Constructor Details
-
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 Details
-
onNext
-
onError
-
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()
-