| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | DISPOSED
Indicates the Disposable has been disposed. |
| protected final Observer | downstream
The target of the events. |
| pack-priv static final int | FUSED_CONSUMED
Indicates this Disposable is in fusion mode and its value has been consumed. |
| pack-priv static final int | FUSED_EMPTY
Indicates this Disposable is in fusion mode and is currently empty. |
| pack-priv static final int | FUSED_READY
Indicates this Disposable is in fusion mode and has a value. |
| private static final long | |
| pack-priv static final int | TERMINATED
Indicates there was a call to complete(T). |
| protected T | value
The value stored temporarily when in fusion mode.
|
| Access | Constructor and Description |
|---|---|
| public | DeferredScalarDisposable(Observer<? super T>
the Observer to wrap, not null (not verified) downstream)Constructs a DeferredScalarDisposable by wrapping the Observer. |
| Modifier and Type | Method and Description |
|---|---|
| public final void | clear()
Implements io. |
| public final void | complete(T
the value to signal, not null (not verified) value)Complete the target with a single value or indicate there is a value available in fusion mode. |
| public final void | |
| public void | dispose()
Implements io. |
| public final void | |
| public final boolean | isDisposed()
Implements io. |
| public final boolean | isEmpty()
Implements io. |
| public final T | poll()
Implements io. |
| public final int | requestFusion(int mode)
Implements io. |
| public final boolean | Returns: true if the current thread succeededTry disposing this Disposable and return true if the current thread succeeded. |
| DISPOSED | back to summary |
|---|---|
| pack-priv static final int DISPOSED Indicates the Disposable has been disposed. | |
| downstream | back to summary |
|---|---|
| protected final Observer<? super T> downstream The target of the events. | |
| FUSED_CONSUMED | back to summary |
|---|---|
| pack-priv static final int FUSED_CONSUMED Indicates this Disposable is in fusion mode and its value has been consumed. | |
| FUSED_EMPTY | back to summary |
|---|---|
| pack-priv static final int FUSED_EMPTY Indicates this Disposable is in fusion mode and is currently empty. | |
| FUSED_READY | back to summary |
|---|---|
| pack-priv static final int FUSED_READY Indicates this Disposable is in fusion mode and has a value. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides io. | |
| TERMINATED | back to summary |
|---|---|
| pack-priv static final int TERMINATED Indicates there was a call to complete(T). | |
| value | back to summary |
|---|---|
| protected T value Hides java. The value stored temporarily when in fusion mode. | |
| DeferredScalarDisposable | back to summary |
|---|---|
| public DeferredScalarDisposable(Observer<? super T> downstream) Constructs a DeferredScalarDisposable by wrapping the Observer.
| |
| clear | back to summary |
|---|---|
| public final void clear() Implements io. Doc from io. Removes all enqueued items from this queue.
| |
| complete | back to summary |
|---|---|
| public final void complete(T value) Complete the target with a single value or indicate there is a value available in fusion mode.
| |
| complete | back to summary |
|---|---|
| public final void complete() Complete the target without any value. | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| error | back to summary |
|---|---|
| public final void error(Throwable t) Complete the target with an error signal.
| |
| isDisposed | back to summary |
|---|---|
| public final boolean isDisposed() Implements io. Doc from io. Returns true if this resource has been disposed.
| |
| isEmpty | back to summary |
|---|---|
| public final boolean isEmpty() Implements io. Doc from io. Returns true if the queue is empty.
Note however that due to potential fused functions in
| |
| poll | back to summary |
|---|---|
| public final T poll() Implements io. Doc from io. Tries to dequeue a value (non-null) or returns null if the queue is empty.
If the producer uses | |
| requestFusion | back to summary |
|---|---|
| public final int requestFusion(int mode) Implements io. Doc from io. Request a fusion mode from the upstream.
This should be called before
Calling this method multiple times or after
| |
| tryDispose | back to summary |
|---|---|
| public final boolean tryDispose() Try disposing this Disposable and return true if the current thread succeeded.
| |