public final class ScheduledRunnable extends java.util.concurrent.atomic.AtomicReferenceArray<java.lang.Object> implements java.lang.Runnable, Disposable
| Constructor and Description |
|---|
ScheduledRunnable(java.lang.Runnable actual,
CompositeResource<Disposable> parent)
Creates a ScheduledRunnable by wrapping the given action and setting
up the optional parent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Dispose the resource, the operation should be idempotent.
|
void |
run() |
void |
setFuture(java.util.concurrent.Future<?> f) |
boolean |
wasScheduled()
Returns true if this ScheduledRunnable has been scheduled.
|
public ScheduledRunnable(java.lang.Runnable actual,
CompositeResource<Disposable> parent)
actual - the runnable to wrap, not-null (not verified)parent - the parent tracking container or null if nonepublic void run()
run in interface java.lang.Runnablepublic void setFuture(java.util.concurrent.Future<?> f)
public boolean wasScheduled()
public void dispose()
Disposabledispose in interface Disposable