| Modifier and Type | Field and Description |
|---|---|
| public static final DisposableHelper | DISPOSED
The singleton instance representing a terminal, disposed state, don't leak it. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | Returns: true if the current thread managed to dispose the Disposablethe target field field)Atomically disposes the Disposable in the field if not already disposed. |
| public void | dispose()
Implements io. |
| public static boolean | Returns: true if d isDISPOSEDthe disposable to check d)Checks if the given Disposable is the common |
| public boolean | isDisposed()
Implements io. |
| public static boolean | Returns: true if the operation succeeded, false if the target field contained the common DISPOSED instance and the given disposable (if not null) is disposed.the target field to change field, Disposable the new disposable, null allowed d)Atomically replaces the Disposable in the field with the given new Disposable but does not dispose the old one. |
| public static void | |
| public static boolean | Returns: true if successful, false if the field contains theDISPOSED instance.the target field field, Disposable the new Disposable to set d)Atomically sets the field and disposes the old contents. |
| public static boolean | Returns: true if the operation succeeded, falsethe target field field, Disposable the disposable to set, not null d)Atomically sets the field to the given non-null Disposable and returns true or returns false if the field is non-null. |
| public static boolean | Returns: true if successful, false otherwisethe target field field, Disposable the disposable to set d)Atomically tries to set the given Disposable on the field if it is null or disposes it if
the field contains |
| public static boolean | Returns: true if the validation succeededthe current Disposable, expected to be null current, Disposable the next Disposable, expected to be non-null next)Verifies that current is null, next is not null, otherwise signals errors to the RxJavaPlugins and returns false. |
| public static DisposableHelper | |
| public static DisposableHelper[] |
| DISPOSED | back to summary |
|---|---|
| public static final DisposableHelper DISPOSED The singleton instance representing a terminal, disposed state, don't leak it. | |
| DisposableHelper | back to summary |
|---|---|
| private DisposableHelper() | |
| dispose | back to summary |
|---|---|
| public static boolean dispose(AtomicReference<Disposable> field) Atomically disposes the Disposable in the field if not already disposed.
| |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| isDisposed | back to summary |
|---|---|
| public static boolean isDisposed(Disposable d) Checks if the given Disposable is the common
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements io. Doc from io. Returns true if this resource has been disposed.
| |
| replace | back to summary |
|---|---|
| public static boolean replace(AtomicReference<Disposable> field, Disposable d) Atomically replaces the Disposable in the field with the given new Disposable but does not dispose the old one.
| |
| reportDisposableSet | back to summary |
|---|---|
| public static void reportDisposableSet() Reports that the disposable is already set to the RxJavaPlugins error handler. | |
| set | back to summary |
|---|---|
| public static boolean set(AtomicReference<Disposable> field, Disposable d) Atomically sets the field and disposes the old contents.
| |
| setOnce | back to summary |
|---|---|
| public static boolean setOnce(AtomicReference<Disposable> field, Disposable d) Atomically sets the field to the given non-null Disposable and returns true or returns false if the field is non-null. If the target field contains the common DISPOSED instance, the supplied disposable is disposed. If the field contains other non-null Disposable, an IllegalStateException is signalled to the RxJavaPlugins.onError hook.
| |
| trySet | back to summary |
|---|---|
| public static boolean trySet(AtomicReference<Disposable> field, Disposable d) Atomically tries to set the given Disposable on the field if it is null or disposes it if
the field contains
| |
| validate | back to summary |
|---|---|
| public static boolean validate(Disposable current, Disposable next) Verifies that current is null, next is not null, otherwise signals errors to the RxJavaPlugins and returns false.
| |
| valueOf | back to summary |
|---|---|
| public static DisposableHelper valueOf(String name) | |
| values | back to summary |
|---|---|
| public static DisposableHelper[] values() | |