Class FlowableObserveOn.ObserveOnConditionalSubscriber<T>
- java.lang.Object
-
- java.lang.Number
-
- java.util.concurrent.atomic.AtomicInteger
-
- io.reactivex.rxjava3.internal.subscriptions.BasicIntQueueSubscription<T>
-
- io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn.BaseObserveOnSubscriber<T>
-
- io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn.ObserveOnConditionalSubscriber<T>
-
- All Implemented Interfaces:
FlowableSubscriber<T>
,QueueFuseable<T>
,QueueSubscription<T>
,SimpleQueue<T>
,java.io.Serializable
,java.lang.Runnable
,org.reactivestreams.Subscriber<T>
,org.reactivestreams.Subscription
- Enclosing class:
- FlowableObserveOn<T>
static final class FlowableObserveOn.ObserveOnConditionalSubscriber<T> extends FlowableObserveOn.BaseObserveOnSubscriber<T>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long
consumed
(package private) ConditionalSubscriber<? super T>
downstream
private static long
serialVersionUID
-
Fields inherited from class io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn.BaseObserveOnSubscriber
cancelled, delayError, done, error, limit, outputFused, prefetch, produced, queue, requested, sourceMode, upstream, worker
-
-
Constructor Summary
Constructors Constructor Description ObserveOnConditionalSubscriber(ConditionalSubscriber<? super T> actual, Scheduler.Worker worker, boolean delayError, int prefetch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onSubscribe(org.reactivestreams.Subscription s)
Implementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)
is established before callingSubscription.request(long)
.T
poll()
Tries to dequeue a value (non-null) or returns null if the queue is empty.(package private) void
runAsync()
(package private) void
runBackfused()
(package private) void
runSync()
-
Methods inherited from class io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn.BaseObserveOnSubscriber
cancel, checkTerminated, clear, isEmpty, onComplete, onError, onNext, request, requestFusion, run, trySchedule
-
Methods inherited from class io.reactivex.rxjava3.internal.subscriptions.BasicIntQueueSubscription
offer, offer
-
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 ConditionalSubscriber<? super T> downstream
-
consumed
long consumed
-
-
Constructor Detail
-
ObserveOnConditionalSubscriber
ObserveOnConditionalSubscriber(ConditionalSubscriber<? super T> actual, Scheduler.Worker worker, boolean delayError, int prefetch)
-
-
Method Detail
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s)
Description copied from interface:FlowableSubscriber
Implementors of this method should make sure everything that needs to be visible inSubscriber.onNext(Object)
is established before callingSubscription.request(long)
. In practice this means no initialization should happen after therequest()
call and additional behavior is thread safe in respect toonNext
.
-
runSync
void runSync()
- Specified by:
runSync
in classFlowableObserveOn.BaseObserveOnSubscriber<T>
-
runAsync
void runAsync()
- Specified by:
runAsync
in classFlowableObserveOn.BaseObserveOnSubscriber<T>
-
runBackfused
void runBackfused()
- Specified by:
runBackfused
in classFlowableObserveOn.BaseObserveOnSubscriber<T>
-
poll
@Nullable public T poll() throws java.lang.Throwable
Description copied from interface:SimpleQueue
Tries to dequeue a value (non-null) or returns null if the queue is empty.If the producer uses
SimpleQueue.offer(Object, Object)
and when polling in pairs, if the first poll() returns a non-null item, the second poll() is guaranteed to return a non-null item as well.- Returns:
- the item or null to indicate an empty queue
- Throws:
java.lang.Throwable
- if some pre-processing of the dequeued item (usually through fused functions) throws.
-
-