T - the buffered value typepublic final class OperatorBufferWithSingleObservable<T,TClosing> extends java.lang.Object implements Observable.Operator<java.util.List<T>,T>
Observable source and stores them in a buffer until the
Observable constructed using the Func0 argument, produces a value. The buffer is then
emitted, and a new buffer is created to replace it. A new Observable will be constructed using
the provided Func0 object, which will determine when this new buffer is emitted. When the source
Observable completes or produces an error, the current buffer is emitted, and the event is
propagated to all subscribed Observers.
Note that this operation only produces non-overlapping chunks. At all times there is exactly one buffer actively storing values.
| Constructor and Description |
|---|
OperatorBufferWithSingleObservable(Func0<? extends Observable<? extends TClosing>> bufferClosingSelector,
int initialCapacity) |
OperatorBufferWithSingleObservable(Observable<? extends TClosing> bufferClosing,
int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
Subscriber<? super T> |
call(Subscriber<? super java.util.List<T>> child) |
public OperatorBufferWithSingleObservable(Func0<? extends Observable<? extends TClosing>> bufferClosingSelector, int initialCapacity)
bufferClosingSelector - a Func0 object which produces Observables. These Observables determine
when a buffer is emitted and replaced by simply producing an object.initialCapacity - the initial capacity of each bufferpublic OperatorBufferWithSingleObservable(Observable<? extends TClosing> bufferClosing, int initialCapacity)
bufferClosing - An Observable to determine
when a buffer is emitted and replaced by simply producing an object.initialCapacity - the initial capacity of each bufferpublic Subscriber<? super T> call(Subscriber<? super java.util.List<T>> child)
call in interface Func1<Subscriber<? super java.util.List<T>>,Subscriber<? super T>>