Constructor and Description |
---|
SimpleFuture() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
void |
done() |
void |
done(V result) |
void |
failed(Throwable exception) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
setException(Throwable exception) |
void |
setResult(V result) |
public V get() throws InterruptedException, ExecutionException
get
in interface Future<V>
InterruptedException
ExecutionException
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<V>
InterruptedException
ExecutionException
TimeoutException
public void setResult(V result)
public void setException(Throwable exception)
public void done()
public void done(V result)
public void failed(Throwable exception)
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<V>