Class QueueDrainObserver<T,U,V>
java.lang.Object
io.reactivex.rxjava3.internal.observers.QueueDrainSubscriberPad0
io.reactivex.rxjava3.internal.observers.QueueDrainSubscriberWip
io.reactivex.rxjava3.internal.observers.QueueDrainSubscriberPad2
io.reactivex.rxjava3.internal.observers.QueueDrainObserver<T,U,V>
- Type Parameters:
T
- the source type to which this subscriber will be subscribedU
- the value type in the queueV
- the value type the child subscriber accepts
- All Implemented Interfaces:
Observer<T>
,ObservableQueueDrain<U,
V>
- Direct Known Subclasses:
ObservableBufferExactBoundary.BufferExactBoundaryObserver
,ObservableBufferTimed.BufferExactBoundedObserver
,ObservableBufferTimed.BufferExactUnboundedObserver
,ObservableBufferTimed.BufferSkipBoundedObserver
public abstract class QueueDrainObserver<T,U,V>
extends QueueDrainSubscriberPad2
implements Observer<T>, ObservableQueueDrain<U,V>
Abstract base class for subscribers that hold another subscriber, a queue
and requires queue-drain behavior.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected boolean
protected Throwable
protected final SimplePlainQueue
<U> Fields inherited from class io.reactivex.rxjava3.internal.observers.QueueDrainSubscriberPad2
p10a, p11a, p12a, p13a, p14a, p15a, p1a, p2a, p3a, p4a, p5a, p6a, p7a, p8a, p9a
Fields inherited from class io.reactivex.rxjava3.internal.observers.QueueDrainSubscriberWip
wip
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Accept the value and return true if forwarded.final boolean
final boolean
done()
final boolean
enter()
final Throwable
error()
protected final void
fastPathEmit
(U value, boolean delayError, Disposable dispose) protected final void
fastPathOrderedEmit
(U value, boolean delayError, Disposable disposable) Makes sure the fast-path emits in order.final int
leave
(int m) Adds m to the wip counter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.reactivex.rxjava3.core.Observer
onComplete, onError, onNext, onSubscribe
-
Field Details
-
downstream
-
queue
-
cancelled
protected volatile boolean cancelled -
done
protected volatile boolean done -
error
-
-
Constructor Details
-
QueueDrainObserver
-
-
Method Details
-
cancelled
public final boolean cancelled()- Specified by:
cancelled
in interfaceObservableQueueDrain<T,
U>
-
done
public final boolean done()- Specified by:
done
in interfaceObservableQueueDrain<T,
U>
-
enter
public final boolean enter()- Specified by:
enter
in interfaceObservableQueueDrain<T,
U>
-
fastPathEmit
-
fastPathOrderedEmit
Makes sure the fast-path emits in order.- Parameters:
value
- the value to emit or queue updelayError
- if true, errors are delayed until the source has terminateddisposable
- the resource to dispose if the drain terminates
-
error
- Specified by:
error
in interfaceObservableQueueDrain<T,
U>
-
leave
public final int leave(int m) Description copied from interface:ObservableQueueDrain
Adds m to the wip counter.- Specified by:
leave
in interfaceObservableQueueDrain<T,
U> - Parameters:
m
- the value to add- Returns:
- the wip value after adding the value
-
accept
Description copied from interface:ObservableQueueDrain
Accept the value and return true if forwarded.- Specified by:
accept
in interfaceObservableQueueDrain<T,
U> - Parameters:
a
- the subscriber to deliver values tov
- the value to deliver
-