T
- the source type to which this subscriber will be subscribedU
- the value type in the queueV
- the value type the child subscriber acceptspublic abstract class QueueDrainObserver<T,U,V> extends Object implements Observer<T>, ObservableQueueDrain<U,V>
Modifier and Type | Field and Description |
---|---|
protected boolean |
cancelled |
protected boolean |
done |
protected Observer<? super V> |
downstream |
protected Throwable |
error |
protected SimplePlainQueue<U> |
queue |
Constructor and Description |
---|
QueueDrainObserver(Observer<? super V> actual,
SimplePlainQueue<U> queue) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Observer<? super V> a,
U v)
Accept the value and return true if forwarded.
|
boolean |
cancelled() |
boolean |
done() |
boolean |
enter() |
Throwable |
error() |
boolean |
fastEnter() |
protected void |
fastPathEmit(U value,
boolean delayError,
Disposable dispose) |
protected void |
fastPathOrderedEmit(U value,
boolean delayError,
Disposable disposable)
Makes sure the fast-path emits in order.
|
int |
leave(int m)
Adds m to the wip counter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onComplete, onError, onNext, onSubscribe
protected final SimplePlainQueue<U> queue
protected volatile boolean cancelled
protected volatile boolean done
protected Throwable error
public QueueDrainObserver(Observer<? super V> actual, SimplePlainQueue<U> queue)
public final boolean cancelled()
cancelled
in interface ObservableQueueDrain<U,V>
public final boolean done()
done
in interface ObservableQueueDrain<U,V>
public final boolean enter()
enter
in interface ObservableQueueDrain<U,V>
public final boolean fastEnter()
protected final void fastPathEmit(U value, boolean delayError, Disposable dispose)
protected final void fastPathOrderedEmit(U value, boolean delayError, Disposable disposable)
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 terminatespublic final Throwable error()
error
in interface ObservableQueueDrain<U,V>
public final int leave(int m)
ObservableQueueDrain
leave
in interface ObservableQueueDrain<U,V>
m
- the value to addpublic void accept(Observer<? super V> a, U v)
ObservableQueueDrain
accept
in interface ObservableQueueDrain<U,V>
a
- the subscriber to deliver values tov
- the value to deliverCopyright © 2019. All rights reserved.