public static class TimeScheduler3.Task extends Object implements Runnable, Delayed, Future
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cancelled |
protected long |
creation_time |
protected long |
delay |
protected boolean |
done |
protected Runnable |
runnable |
| Constructor and Description |
|---|
Task(Runnable runnable) |
Task(Runnable runnable,
long initial_delay,
TimeUnit unit) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(Delayed o) |
Object |
get() |
Object |
get(long timeout,
TimeUnit unit) |
long |
getDelay(TimeUnit unit) |
Runnable |
getRunnable() |
boolean |
isCancelled() |
boolean |
isDone() |
void |
run() |
String |
toString() |
protected final Runnable runnable
protected long creation_time
protected long delay
protected volatile boolean cancelled
protected volatile boolean done
public Task(Runnable runnable)
public Runnable getRunnable()
public int compareTo(Delayed o)
compareTo in interface Comparable<Delayed>public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Futurepublic Object get() throws InterruptedException, ExecutionException
get in interface FutureInterruptedExceptionExecutionExceptionpublic Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface FutureInterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.