Disposable sub-interfaces (Disposable.Composite ,
Disposable.Swap ).
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | Disposables.AlwaysDisposable
Immutable disposable that is always |
| pack-priv static class | |
| pack-priv static class | Disposables.NeverDisposable
Immutable disposable that is never |
| pack-priv static class | Disposables.SimpleDisposable
A very simple |
| pack-priv static class | Disposables.SwapDisposable
Not public API. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Disposable | DISPOSED
A singleton |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Disposable. | Returns: an empty atomicDisposable.Create a new empty |
| public static Disposable. | Returns: a pre-filled atomicDisposable.Create and initialize a new |
| public static Disposable. | Returns: a pre-filled atomicDisposable.Create and initialize a new |
| pack-priv static <T> boolean | Returns: true if theDisposable held by the field was properly disposedthe target field updater updater, T the target instance holding the field holder)Atomically dispose the |
| public static Disposable | |
| pack-priv static boolean | Returns: true if d isDISPOSEDthe disposable to check d)Check if the given |
| public static Disposable | Returns: a newDisposable that can never be disposed.Return a new |
| pack-priv static <T> boolean | Returns: true if the operation succeeded, false if the target field contained the commonDISPOSED instance and the given disposable is not null but is disposed.the target field updater updater, T the target instance holding the field holder, Disposable the new Disposable to set, null allowed newValue)Atomically replace the |
| pack-priv static <T> boolean | Returns: true if successful, false if the field contains theDISPOSED instance.the target field updater updater, T the target instance holding the field holder, Disposable the new Disposable to set newValue)Atomically set the field to a |
| public static Disposable | Returns: a newDisposable initially not yet disposed.Return a new simple |
| public static Disposable. | Returns: an empty atomicDisposable.Create a new empty |
| DISPOSED | back to summary |
|---|---|
| pack-priv static final Disposable DISPOSED A singleton | |
| Disposables | back to summary |
|---|---|
| private Disposables() | |
| composite | back to summary |
|---|---|
| public static Disposable. Create a new empty
| |
| composite | back to summary |
|---|---|
| public static Disposable. Create and initialize a new
| |
| composite | back to summary |
|---|---|
| public static Disposable. Create and initialize a new
| |
| dispose | back to summary |
|---|---|
| pack-priv static <T> boolean dispose(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder) Atomically dispose the
| |
| disposed | back to summary |
|---|---|
| public static Disposable disposed() Return a new
| |
| isDisposed | back to summary |
|---|---|
| pack-priv static boolean isDisposed(Disposable d) Check if the given
| |
| never | back to summary |
|---|---|
| public static Disposable never() Return a new
| |
| replace | back to summary |
|---|---|
| pack-priv static <T> boolean replace(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder, Disposable newValue) Atomically replace the
| |
| set | back to summary |
|---|---|
| pack-priv static <T> boolean set(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder, Disposable newValue) Atomically set the field to a
| |
| single | back to summary |
|---|---|
| public static Disposable single() Return a new simple
| |
| swap | back to summary |
|---|---|
| public static Disposable. Create a new empty
| |
disposed. Calling
dispose() does nothing, and isDisposed() always return true.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements reactor. |
| public boolean | isDisposed()
Overrides default reactor. |
| AlwaysDisposable | back to summary |
|---|---|
| pack-priv AlwaysDisposable() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements reactor. Doc from reactor. Cancel or dispose the underlying task or resource. Implementations are required to make this method idempotent.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Overrides default reactor. Doc from reactor. Optionally return true when the resource or task is disposed. Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile boolean | |
| pack-priv List |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(Disposable
the d)Disposable to add.Implements reactor. Disposable to this container, if it is not disposed.
|
| public boolean | addAll(Collection<? extends Disposable>
the collection of Disposables ds)Overrides default reactor. |
| pack-priv Stream | |
| public void | |
| public void | dispose()
Implements reactor. disposed, clear it and then
dispose all the previously contained Disposables.
|
| pack-priv void | |
| public Stream | inners()
Overrides default reactor. Stream of referenced inners (flatmap, multicast etc)
|
| public boolean | isDisposed()
Implements reactor. |
| public boolean | remove(Disposable
the d)Disposable to remove.Implements reactor. Disposable from this container, without disposing it.
|
| public Object | scanUnsafe(Scannable.
a keyAttr to resolve for the component.Implements reactor. |
| public int | size()
Implements reactor. |
| disposed | back to summary |
|---|---|
| pack-priv volatile boolean disposed | |
| resources | back to summary |
|---|---|
| pack-priv List<Disposable> resources
| |
| ListCompositeDisposable | back to summary |
|---|---|
| pack-priv ListCompositeDisposable() | |
| ListCompositeDisposable | back to summary |
|---|---|
| pack-priv ListCompositeDisposable(Disposable... resources) | |
| ListCompositeDisposable | back to summary |
|---|---|
| pack-priv ListCompositeDisposable(Iterable<? extends Disposable> resources) | |
| add | back to summary |
|---|---|
| public boolean add(Disposable d) Implements reactor. Doc from reactor. Add a
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(Collection<? extends Disposable> ds) Overrides default reactor. Doc from reactor. Adds the given collection of Disposables to the container or disposes them all if the container has been disposed.
| |
| asStream | back to summary |
|---|---|
| pack-priv Stream | |
| clear | back to summary |
|---|---|
| public void clear() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements reactor. Doc from reactor. Atomically mark the container as
| |
| dispose | back to summary |
|---|---|
| pack-priv void dispose(List<Disposable> set) | |
| inners | back to summary |
|---|---|
| public Stream Overrides default reactor. Doc from reactor. Return a | |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements reactor. Doc from reactor. Indicates if the container has already been disposed. Note that if that is the case, attempts to add new disposable to it via
| |
| remove | back to summary |
|---|---|
| public boolean remove(Disposable d) Implements reactor. Doc from reactor. Delete the
It becomes the responsibility of the caller to dispose the value themselves,
which they can do by a simple call to
| |
| scanUnsafe | back to summary |
|---|---|
| public Object scanUnsafe(Scannable. Implements reactor. Doc from reactor. This method is used internally by components to define their key-value mappings
in a single place. Although it is ignoring the generic type of the
For public consumption of attributes, prefer using | |
| size | back to summary |
|---|---|
| public int size() Implements reactor. Doc from reactor. Returns the number of currently held Disposables.
| |
disposed. Calling
dispose() does nothing, and isDisposed() always return false.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements reactor. |
| public boolean | isDisposed()
Overrides default reactor. |
| NeverDisposable | back to summary |
|---|---|
| pack-priv NeverDisposable() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements reactor. Doc from reactor. Cancel or dispose the underlying task or resource. Implementations are required to make this method idempotent.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Overrides default reactor. Doc from reactor. Optionally return true when the resource or task is disposed. Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.
| |
Disposable that only wraps a mutable boolean for
isDisposed().
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements reactor. |
| public boolean | isDisposed()
Overrides default reactor. |
| SimpleDisposable | back to summary |
|---|---|
| pack-priv SimpleDisposable() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements reactor. Doc from reactor. Cancel or dispose the underlying task or resource. Implementations are required to make this method idempotent.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Overrides default reactor. Doc from reactor. Optionally return true when the resource or task is disposed. Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.
| |
Swap.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile Disposable | |
| pack-priv static final AtomicReferenceFieldUpdater |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements reactor. |
| public Disposable | |
| public boolean | isDisposed()
Overrides default reactor. |
| public boolean | replace(Disposable
the next)Disposable to set, may be nullImplements reactor. Disposable on this container but don't dispose the previous
one (if any).
|
| public boolean | update(Disposable
the next)Disposable to set, may be nullImplements reactor. Disposable on this container and dispose the previous
one (if any).
|
| inner | back to summary |
|---|---|
| pack-priv volatile Disposable inner | |
| INNER | back to summary |
|---|---|
| pack-priv static final AtomicReferenceFieldUpdater<Disposables. | |
| SwapDisposable | back to summary |
|---|---|
| pack-priv SwapDisposable() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements reactor. Doc from reactor. Cancel or dispose the underlying task or resource. Implementations are required to make this method idempotent.
| |
| get | back to summary |
|---|---|
| public Disposable get() Implements java. Doc from java. Gets a result.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Overrides default reactor. Doc from reactor. Optionally return true when the resource or task is disposed. Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.
| |
| replace | back to summary |
|---|---|
| public boolean replace(Disposable next) Implements reactor. Doc from reactor. Atomically set the next
| |
| update | back to summary |
|---|---|
| public boolean update(Disposable next) Implements reactor. Doc from reactor. Atomically set the next
| |