T - The result type returned by this Future's get method.public class SimpleFuture<T>
extends java.lang.Object
| Constructor and Description |
|---|
SimpleFuture(java.util.concurrent.Callable<T> callable) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
protected void |
done() |
T |
get() |
T |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
void |
run() |
public SimpleFuture(java.util.concurrent.Callable<T> callable)
public boolean isCancelled()
public boolean cancel(boolean mayInterruptIfRunning)
public T get() throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic T get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void run()
protected void done()