public final class ScheduledRunnable extends AtomicReferenceArray<Object> implements Runnable, Callable<Object>, Disposable
Constructor and Description |
---|
ScheduledRunnable(Runnable actual,
DisposableContainer parent)
Creates a ScheduledRunnable by wrapping the given action and setting
up the optional parent.
|
Modifier and Type | Method and Description |
---|---|
Object |
call() |
void |
dispose()
Dispose the resource, the operation should be idempotent.
|
boolean |
isDisposed()
Returns true if this resource has been disposed.
|
void |
run() |
void |
setFuture(Future<?> f) |
accumulateAndGet, compareAndSet, get, getAndAccumulate, getAndSet, getAndUpdate, lazySet, length, set, toString, updateAndGet, weakCompareAndSet
public ScheduledRunnable(Runnable actual, DisposableContainer parent)
actual
- the runnable to wrap, not-null (not verified)parent
- the parent tracking container or null if nonepublic void setFuture(Future<?> f)
public void dispose()
Disposable
dispose
in interface Disposable
public boolean isDisposed()
Disposable
isDisposed
in interface Disposable
Copyright © 2019. All rights reserved.