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