Observable source and stores them in the currently active chunks.
Initially there are no chunks active.
Chunks can be created by pushing a TOpening value to the "bufferOpenings"
Observable. This creates a new buffer which will then start recording values which are produced
by the "source" Observable. Additionally the "bufferClosingSelector" will be used to construct an
Observable which can produce values. When it does so it will close this (and only this) newly
created buffer. When the source Observable completes or produces an error, all chunks are
emitted, and the event is propagated to all subscribed Observers.
Note that when using this operation multiple overlapping chunks could be active at any one point.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Func1 | |
| pack-priv final Observable |
| Access | Constructor and Description |
|---|---|
| public | OperatorBufferWithStartEndObservable(Observable<? extends TOpening>
an bufferOpenings, Func1<? super TOpening, ? extends Observable<? extends TClosing>> Observable which when it produces a TOpening value will create a
new buffer which instantly starts recording the "source" Observablea bufferClosingSelector)Func1 object which produces Observables. These Observables determine
when a buffer is emitted and replaced by simply producing an object.
|
| Modifier and Type | Method and Description |
|---|---|
| public Subscriber |
| bufferClosing | back to summary |
|---|---|
| pack-priv final Func1<? super TOpening, ? extends Observable<? extends TClosing>> bufferClosing | |
| bufferOpening | back to summary |
|---|---|
| pack-priv final Observable<? extends TOpening> bufferOpening | |
| OperatorBufferWithStartEndObservable | back to summary |
|---|---|
public OperatorBufferWithStartEndObservable(Observable<? extends TOpening> bufferOpenings, Func1<? super TOpening, ? extends Observable<? extends TClosing>> bufferClosingSelector)
| |
| call | back to summary |
|---|---|
| public Subscriber Implements rx.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subscriber | |
| pack-priv final List | chunks
Guarded by this. |
| pack-priv final CompositeSubscription | |
| 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. |
| pack-priv void |
| child | back to summary |
|---|---|
| pack-priv final Subscriber<? super List<T>> child | |
| chunks | back to summary |
|---|---|
| pack-priv final List<List<T>> chunks Guarded by this. | |
| closingSubscriptions | back to summary |
|---|---|
| pack-priv final CompositeSubscription closingSubscriptions | |
| done | back to summary |
|---|---|
| pack-priv boolean done Guarded by this. | |
| BufferingSubscriber | back to summary |
|---|---|
| public BufferingSubscriber(Subscriber<? super List<T>> child) | |
| endBuffer | back to summary |
|---|---|
| pack-priv void endBuffer(List<T> toEnd) | |
| 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
| |
| startBuffer | back to summary |
|---|---|
| pack-priv void startBuffer(TOpening v) | |