T - type of the items being queued and emitted by this drainerpublic final class DrainerSyncBiased<T> extends Object implements Drainer<T>
| Modifier and Type | Method and Description |
|---|---|
static <T> DrainerSyncBiased<T> |
create(Queue<T> queue,
rx.Subscriber<? super T> child) |
void |
onCompleted() |
void |
onError(Throwable e) |
void |
onNext(T t) |
void |
request(long n) |
long |
surplus()
Returns the current best estimate of
|
public static <T> DrainerSyncBiased<T> create(Queue<T> queue, rx.Subscriber<? super T> child)
public void request(long n)
request in interface rx.Producerpublic void onCompleted()
onCompleted in interface rx.Observer<T>public long surplus()
DrainercurrentExpected + numQueuedEmissions + numEmitted - totalRequested -
This value can then be subtracted from a request from downstream to estimate the number required from upstream.
Copyright © 2013–2015. All rights reserved.