groupBy and pivot.
This currently has temporary unbounded buffers. It needs to become bounded and then do one of two things:
Generally the buffer should be very short lived (milliseconds) and then stops being involved. It can become a
memory leak though if a GroupedObservable backed by this class is emitted but never subscribed to
(such as filtered out). In that case, either a time-bomb to throw away the buffer, or just blowing up and
making the user do something about it is needed.
For example, to filter out GroupedObservables, perhaps they need a silent subscribe() on them
to just blackhole the data.
This is an initial start at solving this problem and solves the immediate problem of groupBy and
pivot and trades off the possibility of memory leak for deterministic functionality.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Observer | |
| private boolean | |
| pack-priv final BufferUntilSubscriber. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static < the value type T> BufferUntilSubscriber | |
| private void | |
| public boolean | hasObservers()
Implements abstract rx. Subject has Observers subscribed to it.
|
| 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. |
| EMPTY_OBSERVER | back to summary |
|---|---|
pack-priv static final Observer<T> EMPTY_OBSERVER
| |
| forward | back to summary |
|---|---|
| private boolean forward | |
| state | back to summary |
|---|---|
| pack-priv final BufferUntilSubscriber. | |
| BufferUntilSubscriber | back to summary |
|---|---|
| private BufferUntilSubscriber(BufferUntilSubscriber. | |
| create | back to summary |
|---|---|
| public static <T> BufferUntilSubscriber Creates a default, unbounded buffering Subject instance.
| |
| emit | back to summary |
|---|---|
| private void emit(Object v) | |
| hasObservers | back to summary |
|---|---|
| public boolean hasObservers() Implements abstract rx. Doc from rx. Indicates whether the
| |
| 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 |
|---|---|
| pack-priv final BufferUntilSubscriber. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| state | back to summary |
|---|---|
| pack-priv final BufferUntilSubscriber. | |
| OnSubscribeAction | back to summary |
|---|---|
| public OnSubscribeAction(BufferUntilSubscriber. | |
| call | back to summary |
|---|---|
| public void call(final Subscriber<? super T> s) Implements rx.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ConcurrentLinkedQueue | |
| pack-priv boolean | |
| pack-priv final Object | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean |
| buffer | back to summary |
|---|---|
| pack-priv final ConcurrentLinkedQueue<Object> buffer | |
| emitting | back to summary |
|---|---|
| pack-priv boolean emitting | |
| guard | back to summary |
|---|---|
| pack-priv final Object guard | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| State | back to summary |
|---|---|
| pack-priv State() | |
| casObserverRef | back to summary |
|---|---|
| pack-priv boolean casObserverRef(Observer<? super T> expected, Observer<? super T> next) | |