| Constructor and Description |
|---|
CompletedFuture(V result) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
static <T> CompletedFuture<T> |
getNull() |
boolean |
isCancelled() |
boolean |
isDone() |
public CompletedFuture(V result)
public static <T> CompletedFuture<T> getNull()
public boolean cancel(boolean mayInterruptIfRunning)
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 isCancelled()
isCancelled in interface Future<V>Copyright © 2015. All rights reserved.