public class AsyncResult<V>
extends java.lang.Object
implements java.util.concurrent.Future<V>
Future
handle that can be used for method signatures
which are declared with a Future return type for asynchronous execution.Async
Constructor and Description |
---|
AsyncResult(V value)
Create a new AsyncResult holder.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
private final V value
public AsyncResult(V value)
value
- the value to pass throughpublic boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future<V>
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<V>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<V>