Top Description Fields Constructors Methods
io.reactivex.rxjava3.internal.observers

public abstract Class QueueDrainObserver<T, U, V>

Additional top-level classes in compilation unit: QueueDrainSubscriberPad0, QueueDrainSubscriberWip, QueueDrainSubscriberPad2.

extends QueueDrainSubscriberPad2
implements Observer<T>, ObservableQueueDrain<U, V>
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.internal.util.ObservableQueueDrain, io.reactivex.rxjava3.core.Observer
Known Direct Subclasses
io.reactivex.rxjava3.internal.operators.observable.ObservableBufferExactBoundary.BufferExactBoundaryObserver, io.reactivex.rxjava3.internal.operators.observable.ObservableBufferTimed.BufferExactUnboundedObserver, io.reactivex.rxjava3.internal.operators.observable.ObservableBufferTimed.BufferSkipBoundedObserver, io.reactivex.rxjava3.internal.operators.observable.ObservableBufferTimed.BufferExactBoundedObserver
Type Parameters
<T>
the source type to which this subscriber will be subscribed
<U>
the value type in the queue
<V>
the value type the child subscriber accepts
Imports
java.util.concurrent.atomic.AtomicInteger, io.reactivex.rxjava3.core.Observer, io.reactivex.rxjava3.disposables.Disposable, io.reactivex.rxjava3.internal.util.*, io.reactivex.rxjava3.operators.SimplePlainQueue

Abstract base class for subscribers that hold another subscriber, a queue and requires queue-drain behavior.

Field Summary

Modifier and TypeField and Description
protected volatile boolean
protected volatile boolean
protected final Observer<? super V>
protected Throwable
protected final SimplePlainQueue<U>
Inherited from io.reactivex.rxjava3.internal.observers.QueueDrainSubscriberPad2:
p10ap11ap12ap13ap14ap15ap1ap2ap3ap4ap5ap6ap7ap8ap9a

Constructor Summary

AccessConstructor and Description
public
QueueDrainObserver(Observer<? super V> actual, SimplePlainQueue<U> queue)

Method Summary

Modifier and TypeMethod and Description
public void
accept(Observer<? super V>
the subscriber to deliver values to
a
,
U
the value to deliver
v
)

Implements io.reactivex.rxjava3.internal.util.ObservableQueueDrain.accept.

Accept the value and return true if forwarded.
public final boolean
public final boolean
public final boolean
public final Throwable
protected final void
fastPathEmit(U value, boolean delayError, Disposable dispose)

protected final void
fastPathOrderedEmit(U
the value to emit or queue up
value
,
boolean
if true, errors are delayed until the source has terminated
delayError
,
Disposable
the resource to dispose if the drain terminates
disposable
)

Makes sure the fast-path emits in order.

public final int
leave(int
the value to add
m
)

Implements io.reactivex.rxjava3.internal.util.ObservableQueueDrain.leave.

Adds m to the wip counter.

Field Detail

cancelledback to summary
protected volatile boolean cancelled
doneback to summary
protected volatile boolean done
downstreamback to summary
protected final Observer<? super V> downstream
errorback to summary
protected Throwable error
queueback to summary
protected final SimplePlainQueue<U> queue

Constructor Detail

QueueDrainObserverback to summary
public QueueDrainObserver(Observer<? super V> actual, SimplePlainQueue<U> queue)

Method Detail

acceptback to summary
public void accept(Observer<? super V> a, U v)

Implements io.reactivex.rxjava3.internal.util.ObservableQueueDrain.accept.

Doc from io.reactivex.rxjava3.internal.util.ObservableQueueDrain.accept.

Accept the value and return true if forwarded.

Parameters
a:Observer<? super V>

the subscriber to deliver values to

v:U

the value to deliver

Annotations
@Override
cancelledback to summary
public final boolean cancelled()

Implements io.reactivex.rxjava3.internal.util.ObservableQueueDrain.cancelled.

Annotations
@Override
doneback to summary
public final boolean done()

Implements io.reactivex.rxjava3.internal.util.ObservableQueueDrain.done.

Annotations
@Override
enterback to summary
public final boolean enter()

Implements io.reactivex.rxjava3.internal.util.ObservableQueueDrain.enter.

Annotations
@Override
errorback to summary
public final Throwable error()

Implements io.reactivex.rxjava3.internal.util.ObservableQueueDrain.error.

Annotations
@Override
fastPathEmitback to summary
protected final void fastPathEmit(U value, boolean delayError, Disposable dispose)
fastPathOrderedEmitback to summary
protected final void fastPathOrderedEmit(U value, boolean delayError, Disposable disposable)

Makes sure the fast-path emits in order.

Parameters
value:U

the value to emit or queue up

delayError:boolean

if true, errors are delayed until the source has terminated

disposable:Disposable

the resource to dispose if the drain terminates

leaveback to summary
public final int leave(int m)

Implements io.reactivex.rxjava3.internal.util.ObservableQueueDrain.leave.

Doc from io.reactivex.rxjava3.internal.util.ObservableQueueDrain.leave.

Adds m to the wip counter.

Parameters
m:int

the value to add

Returns:int

the wip value after adding the value

Annotations
@Override