| Constructor and Description |
|---|
WritableFuture() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
void |
fail(Exception exception)
Mark this execution as failed.
|
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
success(V result)
Mark this execution as success.
|
public boolean isCancelled()
isCancelled in interface Future<V>public V get() throws InterruptedException, ExecutionException
get in interface Future<V>InterruptedExceptionExecutionExceptionpublic V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<V>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic boolean cancel(boolean mayInterruptIfRunning)
public void success(V result)
result - Result of executionpublic void fail(Exception exception)
exception - Failure reasonCopyright © 2019. All Rights Reserved.