Class ScheduledRunnable
java.lang.Object
java.util.concurrent.atomic.AtomicReferenceArray<Object>
io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable
- All Implemented Interfaces:
Disposable, Serializable, Runnable, Callable<Object>
public final class ScheduledRunnable
extends AtomicReferenceArray<Object>
implements Runnable, Callable<Object>, Disposable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionScheduledRunnable(Runnable actual, DisposableContainer parent) Creates a ScheduledRunnable by wrapping the given action and setting up the optional parent.ScheduledRunnable(Runnable actual, DisposableContainer parent, boolean interruptOnCancel) Creates a ScheduledRunnable by wrapping the given action and setting up the optional parent. -
Method Summary
Methods inherited from class AtomicReferenceArray
accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, length, set, setOpaque, setPlain, setRelease, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
Constructor Details
-
ScheduledRunnable
Creates a ScheduledRunnable by wrapping the given action and setting up the optional parent. The underlying future will be interrupted if the task is disposed asynchronously.- Parameters:
actual- the runnable to wrap, not-null (not verified)parent- the parent tracking container or null if none
-
ScheduledRunnable
Creates a ScheduledRunnable by wrapping the given action and setting up the optional parent.- Parameters:
actual- the runnable to wrap, not-null (not verified)parent- the parent tracking container or null if noneinterruptOnCancel- if true, the underlying future will be interrupted when disposing this task from a different thread than it is running on.
-
-
Method Details
-
call
-
run
-
setFuture
-
dispose
public void dispose()Description copied from interface:DisposableDispose the resource, the operation should be idempotent.- Specified by:
disposein interfaceDisposable
-
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
-
toString
- Overrides:
toStringin classAtomicReferenceArray<Object>
-