T - the buffered value type
public final class OperatorBufferWithTime<T> extends Objectimplements Observable .Operator <List <T> ,T>
Observable source and stores them in a buffer. Periodically the buffer is emitted and replaced with a new buffer. How often this is done depends on the specified timespan. The creation of chunks is also periodical. How often this is done depends on the specified timeshift. When the source
Observable completes or produces an error, the current buffer is emitted, and the event is propagated to all subscribed
Subscribers.
Note that this operation can produce non-connected, or overlapping chunks depending on the input parameters.
| Constructor and Description |
|---|
OperatorBufferWithTime(long timespan, long timeshift, TimeUnit
|
public OperatorBufferWithTime(long timespan,
long timeshift,
TimeUnit unit,
int count,
Scheduler scheduler)
timespan - the amount of time all chunks must be actively collect values before being emitted
timeshift - the amount of time between creating chunks
unit - the
TimeUnit defining the unit of time for the timespan
count - the maximum size of the buffer. Once a buffer reaches this size, it is emitted
scheduler - the
Scheduler to use for timing chunks
public Subscriber<? super T> call(Subscriber <? super List <T>> child)