| Modifier and Type | Class and Description |
|---|---|
| protected static class | SubjectSubscriptionManager.State<T>
State-machine representing the termination state and active SubjectObservers. |
| protected static class | SubjectSubscriptionManager.SubjectObserver<
the consumed value type of the actual Observer T>Observer wrapping the actual Subscriber and providing various emission facilities. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | active
Indicates that the subject is active (cheaper than checking the state). |
| pack-priv volatile Object | latest
Stores the latest value or the terminal value for some Subjects. |
| pack-priv Action1 | onAdded
Action called after the subscriber has been added to the state. |
| pack-priv Action1 | onStart
Action called when a new subscriber subscribes but before it is added to the state. |
| pack-priv Action1 | onTerminated
Action called when the subscriber wants to subscribe to a terminal state. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | Returns: false if the subject is already in its terminal statethe SubjectObserver to add oTry to atomically add a SubjectObserver to the active state. |
| pack-priv void | addUnsubscriber(Subscriber<? super T> child, final SubjectSubscriptionManager.
Registers the unsubscribe action for the given subscriber. |
| public void | |
| pack-priv Object | |
| pack-priv SubjectSubscriptionManager. | |
| pack-priv SubjectSubscriptionManager. | |
| pack-priv void | remove(SubjectSubscriptionManager.
the SubjectObserver to remove oAtomically remove the specified SubjectObserver from the active observers. |
| pack-priv void | |
| pack-priv SubjectSubscriptionManager. |
| active | back to summary |
|---|---|
| pack-priv boolean active Indicates that the subject is active (cheaper than checking the state). | |
| latest | back to summary |
|---|---|
| pack-priv volatile Object latest Stores the latest value or the terminal value for some Subjects. | |
| onAdded | back to summary |
|---|---|
| pack-priv Action1<SubjectSubscriptionManager. Action called after the subscriber has been added to the state. | |
| onStart | back to summary |
|---|---|
| pack-priv Action1<SubjectSubscriptionManager. Action called when a new subscriber subscribes but before it is added to the state. | |
| onTerminated | back to summary |
|---|---|
| pack-priv Action1<SubjectSubscriptionManager. Action called when the subscriber wants to subscribe to a terminal state. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| SubjectSubscriptionManager | back to summary |
|---|---|
| public SubjectSubscriptionManager() | |
| add | back to summary |
|---|---|
| pack-priv boolean add(SubjectSubscriptionManager. Try to atomically add a SubjectObserver to the active state.
| |
| addUnsubscriber | back to summary |
|---|---|
| pack-priv void addUnsubscriber(Subscriber<? super T> child, final SubjectSubscriptionManager. Registers the unsubscribe action for the given subscriber. | |
| call | back to summary |
|---|---|
| public void call(final Subscriber<? super T> child) Implements rx.
| |
| getLatest | back to summary |
|---|---|
pack-priv Object getLatest()
| |
| next | back to summary |
|---|---|
| pack-priv SubjectSubscriptionManager. Set a new latest NotificationLite value and return the active observers.
| |
| observers | back to summary |
|---|---|
pack-priv SubjectSubscriptionManager.
| |
| remove | back to summary |
|---|---|
| pack-priv void remove(SubjectSubscriptionManager. Atomically remove the specified SubjectObserver from the active observers.
| |
| setLatest | back to summary |
|---|---|
| pack-priv void setLatest(Object value) Set the latest NotificationLite value. | |
| terminate | back to summary |
|---|---|
| pack-priv SubjectSubscriptionManager. Atomically set the terminal NotificationLite value (which could be any of the 3), clear the active observers and return the last active observers.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final SubjectSubscriptionManager. | |
| pack-priv static final SubjectSubscriptionManager. | |
| pack-priv final SubjectSubscriptionManager. | |
| pack-priv final boolean | |
| pack-priv static final SubjectSubscriptionManager. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public SubjectSubscriptionManager. | |
| public SubjectSubscriptionManager. |
| EMPTY | back to summary |
|---|---|
| pack-priv static final SubjectSubscriptionManager. | |
| NO_OBSERVERS | back to summary |
|---|---|
| pack-priv static final SubjectSubscriptionManager. | |
| observers | back to summary |
|---|---|
| pack-priv final SubjectSubscriptionManager. | |
| terminated | back to summary |
|---|---|
| pack-priv final boolean terminated | |
| TERMINATED | back to summary |
|---|---|
| pack-priv static final SubjectSubscriptionManager. | |
| State | back to summary |
|---|---|
| public State(boolean terminated, SubjectSubscriptionManager. | |
| add | back to summary |
|---|---|
| public SubjectSubscriptionManager. | |
| remove | back to summary |
|---|---|
| public SubjectSubscriptionManager. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subscriber | actual
The actual Observer. |
| pack-priv volatile boolean | caughtUp
Indicate that the observer has caught up. |
| pack-priv boolean | emitting
Guarded by this. |
| pack-priv boolean | |
| pack-priv boolean | first
Was the emitFirst run? |
| private volatile Object | index
Indicate where the observer is at replaying. |
| pack-priv List | queue
Guarded by this. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv Observer | |
| public < the index type I> I | |
| public 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. |
| actual | back to summary |
|---|---|
| pack-priv final Subscriber<? super T> actual The actual Observer. | |
| caughtUp | back to summary |
|---|---|
| pack-priv volatile boolean caughtUp Indicate that the observer has caught up. | |
| emitting | back to summary |
|---|---|
| pack-priv boolean emitting Guarded by this. | |
| fastPath | back to summary |
|---|---|
| pack-priv boolean fastPath | |
| first | back to summary |
|---|---|
| pack-priv boolean first Was the emitFirst run? Guarded by this. | |
| index | back to summary |
|---|---|
| private volatile Object index Indicate where the observer is at replaying. | |
| queue | back to summary |
|---|---|
| pack-priv List<Object> queue Guarded by this. | |
| SubjectObserver | back to summary |
|---|---|
| public SubjectObserver(Subscriber<? super T> actual) | |
| accept | back to summary |
|---|---|
| pack-priv void accept(Object n) Dispatches a NotificationLite value to the actual Observer.
| |
| emitFirst | back to summary |
|---|---|
| pack-priv void emitFirst(Object n) Tries to emit a NotificationLite value as the first value and drains the queue as long as possible.
| |
| emitLoop | back to summary |
|---|---|
| pack-priv void emitLoop(List<Object> localQueue, Object current) Emits the contents of the queue as long as there are values. | |
| emitNext | back to summary |
|---|---|
| pack-priv void emitNext(Object n) Emits the given NotificationLite value and prevents the emitFirst to run if not already run.
| |
| getActual | back to summary |
|---|---|
pack-priv Observer
| |
| index | back to summary |
|---|---|
| public <I> I index() Returns the stored index.
| |
| index | back to summary |
|---|---|
| public void index(Object newIndex) Sets a new index value.
| |
| 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
| |