Class FutureDisposable
java.lang.Object
java.util.concurrent.atomic.AtomicReference<Future<?>>
io.reactivex.rxjava3.disposables.FutureDisposable
- All Implemented Interfaces:
Disposable, Serializable
A Disposable container that cancels a
Future instance.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Dispose the resource, the operation should be idempotent.booleanReturns true if this resource has been disposed.Methods inherited from class 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 Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
allowInterrupt
private final boolean allowInterrupt
-
-
Constructor Details
-
FutureDisposable
FutureDisposable(Future<?> run, boolean allowInterrupt)
-
-
Method Details
-
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
-