| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final UnicastSubject. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static < the input and output value type T> UnicastSubject | Returns: the created UnicastSubject instanceConstructs an empty UnicastSubject instance with the default capacity hint of 16 elements. |
| public static < the input and output value type T> UnicastSubject | Returns: the created BufferUntilSubscriber instancethe capacity hint for the internal queue capacityHint)Constructs an empty UnicastSubject instance with a capacity hint. |
| public static < the input and output value type T> UnicastSubject | Returns: the created UnicastSubject instancedeliver pending next events before error. delayError)Constructs an empty UnicastSubject instance with the default capacity hint of 16 elements. |
| public static < the input and output value type T> UnicastSubject | Returns: the created BufferUntilSubscriber instancethe capacity hint for the internal queue capacityHint, Action0 the optional callback to call when subject reaches its terminal state
or the single Subscriber unsubscribes mid-sequence. It will be called
at most once. onTerminated)Constructs an empty UnicastSubject instance with a capacity hint and an Action0 instance to call if the subject reaches its terminal state or the single Subscriber unsubscribes mid-sequence. |
| public static < the input and output value type T> UnicastSubject | Returns: the created BufferUntilSubscriber instancethe capacity hint for the internal queue capacityHint, Action0 the optional callback to call when subject reaches its terminal state
or the single Subscriber unsubscribes mid-sequence. It will be called
at most once. onTerminated, boolean flag indicating whether to deliver pending next events before error. delayError)Constructs an empty UnicastSubject instance with a capacity hint, delay error flag and Action0 instance to call if the subject reaches its terminal state or the single Subscriber unsubscribes mid-sequence. |
| 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. |
| state | back to summary |
|---|---|
| pack-priv final UnicastSubject. | |
| UnicastSubject | back to summary |
|---|---|
| private UnicastSubject(UnicastSubject. | |
| create | back to summary |
|---|---|
| public static <T> UnicastSubject Constructs an empty UnicastSubject instance with the default capacity hint of 16 elements.
| |
| create | back to summary |
|---|---|
| public static <T> UnicastSubject Constructs an empty UnicastSubject instance with a capacity hint. The capacity hint determines the internal queue's island size: the larger it is the less frequent allocation will happen if there is no subscriber or the subscriber hasn't caught up.
| |
| create | back to summary |
|---|---|
| public static <T> UnicastSubject Constructs an empty UnicastSubject instance with the default capacity hint of 16 elements.
| |
| create | back to summary |
|---|---|
| public static <T> UnicastSubject Constructs an empty UnicastSubject instance with a capacity hint and an Action0 instance to call if the subject reaches its terminal state or the single Subscriber unsubscribes mid-sequence. The capacity hint determines the internal queue's island size: the larger it is the less frequent allocation will happen if there is no subscriber or the subscriber hasn't caught up.
| |
| create | back to summary |
|---|---|
| public static <T> UnicastSubject Constructs an empty UnicastSubject instance with a capacity hint, delay error flag and Action0 instance to call if the subject reaches its terminal state or the single Subscriber unsubscribes mid-sequence. The capacity hint determines the internal queue's island size: the larger it is the less frequent allocation will happen if there is no subscriber or the subscriber hasn't caught up.
| |
| 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 volatile boolean | caughtUp
Indicates the queue can be bypassed because the child has caught up with the replay. |
| pack-priv final boolean | delayError
Deliver pending next events before error. |
| pack-priv volatile boolean | done
Indicates the source has terminated. |
| pack-priv boolean | emitting
Emitter loop: emitting indicator. |
| pack-priv Throwable | error
In case the source emitted an error. |
| pack-priv boolean | missed
Emitter loop: missed emission indicator. |
| pack-priv final Queue | queue
The queue holding values until the subscriber arrives and catches up. |
| private static final long | |
| pack-priv final AtomicReference | subscriber
The single subscriber. |
| pack-priv final AtomicReference | terminateOnce
Atomically set to true on terminal condition. |
| Access | Constructor and Description |
|---|---|
| public | State(int
indicates how large each island in the Spsc queue should be to
reduce allocation frequency capacityHint, boolean deliver pending next events before error. delayError, Action0 the action to call when the subject reaches its terminal state or
the single subscriber unsubscribes. onTerminated)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public void | call(Subscriber<? super T>
the incoming Subscriber instance, not null subscriber)Implements rx. |
| pack-priv boolean | Returns: true if this Subject reached a terminal state and the drain loop should quitindicates the source has called onCompleted done, boolean indicates if there are no more source values in the queue empty, boolean indicates whether to deliver pending next events before error delayError, Subscriber<? super T> the target Subscriber to emit events to s)Checks if one of the terminal conditions have been met: child unsubscribed, an error happened or the source terminated and the queue is empty |
| pack-priv void | |
| public boolean | isUnsubscribed()
Implements rx. Subscription is currently unsubscribed.
|
| 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 | |
| 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. |
| public void | unsubscribe()
Implements rx. |
| caughtUp | back to summary |
|---|---|
| pack-priv volatile boolean caughtUp Indicates the queue can be bypassed because the child has caught up with the replay. | |
| delayError | back to summary |
|---|---|
| pack-priv final boolean delayError Deliver pending next events before error. | |
| done | back to summary |
|---|---|
| pack-priv volatile boolean done Indicates the source has terminated. | |
| emitting | back to summary |
|---|---|
| pack-priv boolean emitting Emitter loop: emitting indicator. Guarded by this. | |
| error | back to summary |
|---|---|
| pack-priv Throwable error In case the source emitted an error. | |
| missed | back to summary |
|---|---|
| pack-priv boolean missed Emitter loop: missed emission indicator. Guarded by this. | |
| queue | back to summary |
|---|---|
| pack-priv final Queue<Object> queue The queue holding values until the subscriber arrives and catches up. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| subscriber | back to summary |
|---|---|
| pack-priv final AtomicReference<Subscriber<? super T>> subscriber The single subscriber. | |
| terminateOnce | back to summary |
|---|---|
| pack-priv final AtomicReference<Action0> terminateOnce Atomically set to true on terminal condition. | |
| State | back to summary |
|---|---|
| public State(int capacityHint, boolean delayError, Action0 onTerminated) Constructor.
| |
| call | back to summary |
|---|---|
| public void call(Subscriber<? super T> subscriber) Implements rx. Tries to set the given subscriber if not already set, sending an IllegalStateException to the subscriber otherwise.
| |
| checkTerminated | back to summary |
|---|---|
| pack-priv boolean checkTerminated(boolean done, boolean empty, boolean delayError, Subscriber<? super T> s) Checks if one of the terminal conditions have been met: child unsubscribed, an error happened or the source terminated and the queue is empty
| |
| doTerminate | back to summary |
|---|---|
| pack-priv void doTerminate() Call the optional termination action at most once. | |
| isUnsubscribed | back to summary |
|---|---|
| public boolean isUnsubscribed() Implements rx. Doc from rx. Indicates whether this
| |
| 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
| |
| replay | back to summary |
|---|---|
| pack-priv void replay() Tries to replay the contents of the queue. | |
| 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);
| |
| unsubscribe | back to summary |
|---|---|
| public void unsubscribe() Implements rx. Terminates the state by setting the done flag and tries to clear the queue. Should be called only when the child unsubscribes
| |