protected static class TimeScheduler2.MyTask
extends java.lang.Object
implements java.util.concurrent.Future, java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cancelled |
protected boolean |
done |
protected TimeScheduler2.MyTask |
next |
protected java.lang.Runnable |
task |
| Modifier | Constructor and Description |
|---|---|
protected |
MyTask(java.lang.Runnable task) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
java.lang.Object |
get() |
java.lang.Object |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
run() |
java.lang.String |
toString() |
protected final java.lang.Runnable task
protected volatile boolean cancelled
protected volatile boolean done
protected TimeScheduler2.MyTask next
public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface java.util.concurrent.Futurepublic boolean isCancelled()
isCancelled in interface java.util.concurrent.Futurepublic boolean isDone()
isDone in interface java.util.concurrent.Futurepublic java.lang.Object get()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Futurejava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionpublic java.lang.Object get(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException,
java.util.concurrent.TimeoutException
get in interface java.util.concurrent.Futurejava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionpublic void run()
run in interface java.lang.Runnablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 1998-2020 Red Hat. All Rights Reserved.