Observable source and stores them in all active chunks until the buffer
contains a specified number of elements. The buffer is then emitted. Chunks are created after a certain
amount of values have been received. When the source Observable completes or produces an error,
the currently active chunks are emitted, and the event is propagated to all subscribed Subscribers.
Note that this operation can produce non-connected, connected non-overlapping, or overlapping chunks depending on the input parameters.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| public | OperatorBufferWithSize(int
the number of elements a buffer should have before being emitted count, int the interval with which chunks have to be created. Note that when skip)skip == count
the operator will produce non-overlapping chunks. If
skip < count, this buffer operation will produce overlapping chunks and if
skip > count non-overlapping chunks will be created and some values will not be pushed
into a buffer at all!
|
| Modifier and Type | Method and Description |
|---|---|
| public Subscriber |
| count | back to summary |
|---|---|
| pack-priv final int count | |
| skip | back to summary |
|---|---|
| pack-priv final int skip | |
| OperatorBufferWithSize | back to summary |
|---|---|
public OperatorBufferWithSize(int count, int skip)
| |
| call | back to summary |
|---|---|
| public Subscriber Implements rx.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subscriber | |
| pack-priv List | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Producer | |
| 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. |
| actual | back to summary |
|---|---|
| pack-priv final Subscriber<? super List<T>> actual | |
| buffer | back to summary |
|---|---|
| pack-priv List<T> buffer | |
| count | back to summary |
|---|---|
| pack-priv final int count | |
| BufferExact | back to summary |
|---|---|
| public BufferExact(Subscriber<? super List<T>> actual, int count) | |
| createProducer | back to summary |
|---|---|
| pack-priv Producer createProducer() | |
| 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
| |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subscriber | |
| pack-priv final int | |
| pack-priv long | |
| pack-priv long | |
| pack-priv final ArrayDeque | |
| pack-priv final AtomicLong | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Producer | |
| 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. |
| actual | back to summary |
|---|---|
| pack-priv final Subscriber<? super List<T>> actual | |
| count | back to summary |
|---|---|
| pack-priv final int count | |
| index | back to summary |
|---|---|
| pack-priv long index | |
| produced | back to summary |
|---|---|
| pack-priv long produced | |
| queue | back to summary |
|---|---|
| pack-priv final ArrayDeque<List<T>> queue | |
| requested | back to summary |
|---|---|
| pack-priv final AtomicLong requested Hides rx. | |
| skip | back to summary |
|---|---|
| pack-priv final int skip | |
| BufferOverlap | back to summary |
|---|---|
| public BufferOverlap(Subscriber<? super List<T>> actual, int count, int skip) | |
| createProducer | back to summary |
|---|---|
| pack-priv Producer createProducer() | |
| 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
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | request(long
the maximum number of items you want this Producer to produce, or n)Long.MAX_VALUE if you
want the Producer to produce items at its own paceImplements rx. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| BufferOverlapProducer | back to summary |
|---|---|
| pack-priv BufferOverlapProducer() | |
| request | back to summary |
|---|---|
| public void request(long n) Implements rx. Doc from rx. Request a certain maximum number of items from this Producer. This is a way of requesting backpressure.
To disable backpressure, pass
Requests are additive but if a sequence of requests totals more than request(100); request(Long.MAX_VALUE-1);
| |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subscriber | |
| pack-priv List | |
| pack-priv final int | |
| pack-priv long | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Producer | |
| 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. |
| actual | back to summary |
|---|---|
| pack-priv final Subscriber<? super List<T>> actual | |
| buffer | back to summary |
|---|---|
| pack-priv List<T> buffer | |
| count | back to summary |
|---|---|
| pack-priv final int count | |
| index | back to summary |
|---|---|
| pack-priv long index | |
| skip | back to summary |
|---|---|
| pack-priv final int skip | |
| BufferSkip | back to summary |
|---|---|
| public BufferSkip(Subscriber<? super List<T>> actual, int count, int skip) | |
| createProducer | back to summary |
|---|---|
| pack-priv Producer createProducer() | |
| 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
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | request(long
the maximum number of items you want this Producer to produce, or n)Long.MAX_VALUE if you
want the Producer to produce items at its own paceImplements rx. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| BufferSkipProducer | back to summary |
|---|---|
| pack-priv BufferSkipProducer() | |
| request | back to summary |
|---|---|
| public void request(long n) Implements rx. Doc from rx. Request a certain maximum number of items from this Producer. This is a way of requesting backpressure.
To disable backpressure, pass
Requests are additive but if a sequence of requests totals more than request(100); request(Long.MAX_VALUE-1);
| |