All other Observable and Subject methods are thread-safe by design.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subject | actual
The actual subscriber to serialize Subscriber calls to. |
| pack-priv volatile boolean | done
Indicates a terminal event has been received and all further events will be dropped. |
| pack-priv boolean | emitting
Indicates an emission is going on, guarded by this. |
| pack-priv AppendOnlyLinkedArrayList | queue
If not null, it holds the missed NotificationLite events. |
| Access | Constructor and Description |
|---|---|
| pack-priv | SerializedSubject(final Subject<T>
the subject wrapped actual)Constructor that wraps an actual subject. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public @Nullable Throwable | getThrowable()
Implements abstract io. |
| public boolean | hasComplete()
Implements abstract io. |
| public boolean | hasObservers()
Implements abstract io. |
| public boolean | hasThrowable()
Implements abstract io. |
| public void | onComplete()
Implements io. Observer that the Observable has finished sending push-based notifications.
|
| public void | |
| public void | onNext(T
the item emitted by the Observable t)Implements io. Observer with a new item to observe.
|
| public void | |
| protected void | |
| public boolean | test(Object
the value o)Implements io. |
| actual | back to summary |
|---|---|
| pack-priv final Subject<T> actual The actual subscriber to serialize Subscriber calls to. | |
| done | back to summary |
|---|---|
| pack-priv volatile boolean done Indicates a terminal event has been received and all further events will be dropped. | |
| emitting | back to summary |
|---|---|
| pack-priv boolean emitting Indicates an emission is going on, guarded by this. | |
| queue | back to summary |
|---|---|
| pack-priv AppendOnlyLinkedArrayList<Object> queue If not null, it holds the missed NotificationLite events. | |
| SerializedSubject | back to summary |
|---|---|
| pack-priv SerializedSubject(final Subject<T> actual) Constructor that wraps an actual subject.
| |
| emitLoop | back to summary |
|---|---|
| pack-priv void emitLoop() Loops until all notifications in the queue has been processed. | |
| getThrowable | back to summary |
|---|---|
| public @Nullable Throwable getThrowable() Implements abstract io. Doc from io. Returns the error that caused the Subject to terminate or null if the Subject hasn't terminated yet. The method is thread-safe. | |
| hasComplete | back to summary |
|---|---|
| public boolean hasComplete() Implements abstract io. Doc from io. Returns true if the subject has reached a terminal state through a complete event. The method is thread-safe.
| |
| hasObservers | back to summary |
|---|---|
| public boolean hasObservers() Implements abstract io. Doc from io. Returns true if the subject has any Observers. The method is thread-safe.
| |
| hasThrowable | back to summary |
|---|---|
| public boolean hasThrowable() Implements abstract io. Doc from io. Returns true if the subject has reached a terminal state through an error event. The method is thread-safe.
| |
| onComplete | back to summary |
|---|---|
| public void onComplete() Implements io. Doc from io. Notifies the
The
| |
| onError | back to summary |
|---|---|
public void onError(Throwable t)
| |
| onNext | back to summary |
|---|---|
| public void onNext(T t) Implements io. Doc from io. Provides the
The
The
| |
| onSubscribe | back to summary |
|---|---|
public void onSubscribe(Disposable d)
| |
| subscribeActual | back to summary |
|---|---|
protected void subscribeActual(Observer<? super T> observer)
| |
| test | back to summary |
|---|---|
| public boolean test(Object o) Implements io. Doc from io. Test the given input value and return a boolean. | |