public final class ScheduledDirectPeriodicTask extends AtomicReference<Future<?>> implements Runnable
Modifier and Type | Field and Description |
---|---|
protected static FutureTask<Void> |
DISPOSED |
protected static FutureTask<Void> |
FINISHED |
protected Runnable |
runnable |
protected Thread |
runner |
Constructor and Description |
---|
ScheduledDirectPeriodicTask(Runnable runnable) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose the resource, the operation should be idempotent.
|
Runnable |
getWrappedRunnable()
Returns the wrapped action.
|
boolean |
isDisposed()
Returns true if this resource has been disposed.
|
void |
run() |
void |
setFuture(Future<?> future) |
accumulateAndGet, compareAndSet, get, getAndAccumulate, getAndSet, getAndUpdate, lazySet, set, toString, updateAndGet, weakCompareAndSet
protected final Runnable runnable
protected Thread runner
protected static final FutureTask<Void> FINISHED
protected static final FutureTask<Void> DISPOSED
public ScheduledDirectPeriodicTask(Runnable runnable)
public final void dispose()
Disposable
dispose
in interface Disposable
public final boolean isDisposed()
Disposable
isDisposed
in interface Disposable
public final void setFuture(Future<?> future)
public Runnable getWrappedRunnable()
SchedulerRunnableIntrospection
getWrappedRunnable
in interface SchedulerRunnableIntrospection
Copyright © 2018 JBoss by Red Hat. All rights reserved.