Disposable atomically.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Disposable | DISPOSED
A singleton |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public 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 boolean | Returns: true if d isDISPOSEDthe disposable to check d)Check if the given |
| public 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 |
| public 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 <T> boolean | Returns: true if the operation succeeded, falsethe target field updater updater, T the target instance holding the field holder, Disposable the new Disposable to set, not null newValue, Consumer<RuntimeException> errorCallback)Atomically set the field to the given non-null |
| public static <T> boolean | Returns: true if successful, false otherwisethe target field updater updater, T the target instance holding the field holder, Disposable the disposable to set newValue)Atomically try to set the given |
| public static boolean | Returns: true if the validation succeededthe current current, Disposable Disposable, expected to be nullthe next next, Consumer<RuntimeException> errorCallback)Disposable, expected to be non-nullVerify that current is null and next is not null, otherwise signal a
|
| DISPOSED | back to summary |
|---|---|
| pack-priv static final Disposable DISPOSED A singleton | |
| OperatorDisposables | back to summary |
|---|---|
| pack-priv OperatorDisposables() | |
| dispose | back to summary |
|---|---|
| public static <T> boolean dispose(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder) Atomically dispose the
| |
| isDisposed | back to summary |
|---|---|
| public static boolean isDisposed(Disposable d) Check if the given
| |
| replace | back to summary |
|---|---|
| public static <T> boolean replace(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder, Disposable newValue) Atomically replace the
| |
| set | back to summary |
|---|---|
| public static <T> boolean set(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder, Disposable newValue) Atomically set the field to a
| |
| setOnce | back to summary |
|---|---|
| public static <T> boolean setOnce(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder, Disposable newValue, Consumer<RuntimeException> errorCallback) Atomically set the field to the given non-null
| |
| trySet | back to summary |
|---|---|
| public static <T> boolean trySet(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder, Disposable newValue) Atomically try to set the given
| |
| validate | back to summary |
|---|---|
| public static boolean validate(Disposable current, Disposable next, Consumer<RuntimeException> errorCallback) Verify that current is null and next is not null, otherwise signal a
| |