Package io.reactivex.rxjava3.disposables
Class FutureDisposable
- java.lang.Object
-
- java.util.concurrent.atomic.AtomicReference<java.util.concurrent.Future<?>>
-
- io.reactivex.rxjava3.disposables.FutureDisposable
-
- All Implemented Interfaces:
Disposable,java.io.Serializable
final class FutureDisposable extends java.util.concurrent.atomic.AtomicReference<java.util.concurrent.Future<?>> implements Disposable
A Disposable container that cancels aFutureinstance.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanallowInterruptprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description FutureDisposable(java.util.concurrent.Future<?> run, boolean allowInterrupt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose the resource, the operation should be idempotent.booleanisDisposed()Returns true if this resource has been disposed.-
Methods inherited from class java.util.concurrent.atomic.AtomicReference
accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
allowInterrupt
private final boolean allowInterrupt
-
-
Method Detail
-
isDisposed
public boolean isDisposed()
Description copied from interface:DisposableReturns true if this resource has been disposed.- Specified by:
isDisposedin interfaceDisposable- Returns:
- true if this resource has been disposed
-
dispose
public void dispose()
Description copied from interface:DisposableDispose the resource, the operation should be idempotent.- Specified by:
disposein interfaceDisposable
-
-