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.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Func0 | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| public | OperatorBufferWithSingleObservable(Func0<? extends Observable<? extends TClosing>>
a bufferClosingSelector, int Func0 object which produces Observables. These Observables determine
when a buffer is emitted and replaced by simply producing an object.the initial capacity of each buffer initialCapacity)
|
| public | OperatorBufferWithSingleObservable(final Observable<? extends TClosing>
An bufferClosing, int Observable to determine
when a buffer is emitted and replaced by simply producing an object.the initial capacity of each buffer initialCapacity)
|
| Modifier and Type | Method and Description |
|---|---|
| public Subscriber |
| bufferClosingSelector | back to summary |
|---|---|
| pack-priv final Func0<? extends Observable<? extends TClosing>> bufferClosingSelector | |
| initialCapacity | back to summary |
|---|---|
| pack-priv final int initialCapacity | |
| OperatorBufferWithSingleObservable | back to summary |
|---|---|
public OperatorBufferWithSingleObservable(Func0<? extends Observable<? extends TClosing>> bufferClosingSelector, int initialCapacity)
| |
| OperatorBufferWithSingleObservable | back to summary |
|---|---|
public OperatorBufferWithSingleObservable(final Observable<? extends TClosing> bufferClosing, int initialCapacity)
| |
| call | back to summary |
|---|---|
| public Subscriber Implements rx.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subscriber | |
| pack-priv List | chunk
Guarded by this. |
| pack-priv boolean | done
Guarded by this. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | onCompleted()
Implements rx. Observable has finished sending push-based notifications.
|
| public void | onError(Throwable
the exception encountered by the Observable e)Implements rx. Observable has experienced an error condition.
|
| public void | onNext(T
the item emitted by the Observable t)Implements rx. |
| child | back to summary |
|---|---|
| pack-priv final Subscriber<? super List<T>> child | |
| chunk | back to summary |
|---|---|
| pack-priv List<T> chunk Guarded by this. | |
| done | back to summary |
|---|---|
| pack-priv boolean done Guarded by this. | |
| BufferingSubscriber | back to summary |
|---|---|
| public BufferingSubscriber(Subscriber<? super List<T>> child) | |
| emit | back to summary |
|---|---|
| pack-priv void emit() | |
| onCompleted | back to summary |
|---|---|
| public void onCompleted() Implements rx. Doc from rx. Notifies the Observer that the
The
| |
| onError | back to summary |
|---|---|
| public void onError(Throwable e) Implements rx. Doc from rx. Notifies the Observer that the
If the | |
| onNext | back to summary |
|---|---|
| public void onNext(T t) Implements rx. Doc from rx. Provides the Observer with a new item to observe.
The
The
| |