T - type of the items being queued and emitted by this drainerpublic class DrainerAsyncBiased<T> extends Object implements Drainer<T>
| Modifier and Type | Method and Description |
|---|---|
static <T> DrainerAsyncBiased<T> |
create(Queue<Object> queue,
rx.Subscription subscription,
rx.Scheduler.Worker worker,
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> DrainerAsyncBiased<T> create(Queue<Object> queue, rx.Subscription subscription, rx.Scheduler.Worker worker, 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.