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 booleanprotected booleanprotected Throwableprotected 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, p9aFields inherited from class io.reactivex.rxjava3.internal.observers.QueueDrainSubscriberWip
wip -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAccept the value and return true if forwarded.final booleanfinal booleandone()final booleanenter()final Throwableerror()protected final voidfastPathEmit(U value, boolean delayError, Disposable dispose) protected final voidfastPathOrderedEmit(U value, boolean delayError, Disposable disposable) Makes sure the fast-path emits in order.final intleave(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, waitMethods 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:
cancelledin interfaceObservableQueueDrain<T,U>
-
done
public final boolean done()- Specified by:
donein interfaceObservableQueueDrain<T,U>
-
enter
public final boolean enter()- Specified by:
enterin 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:
errorin interfaceObservableQueueDrain<T,U>
-
leave
public final int leave(int m) Description copied from interface:ObservableQueueDrainAdds m to the wip counter.- Specified by:
leavein interfaceObservableQueueDrain<T,U> - Parameters:
m- the value to add- Returns:
- the wip value after adding the value
-
accept
Description copied from interface:ObservableQueueDrainAccept the value and return true if forwarded.- Specified by:
acceptin interfaceObservableQueueDrain<T,U> - Parameters:
a- the subscriber to deliver values tov- the value to deliver
-