K - The type of this FutureV - The type of the wrapped Futurepublic abstract class FutureWrapper<K,V>
extends java.lang.Object
implements java.util.concurrent.Future<V>
FutureWrapper is a simple Future that wraps a
parent Future. This class is thread-safe.| Constructor and Description |
|---|
FutureWrapper(java.util.concurrent.Future<K> parent) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
boolean |
equals(java.lang.Object obj) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
int |
hashCode() |
boolean |
isCancelled() |
boolean |
isDone() |
public FutureWrapper(java.util.concurrent.Future<K> parent)
public 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>public V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
get in interface java.util.concurrent.Future<V>java.util.concurrent.ExecutionExceptionjava.lang.InterruptedExceptionpublic V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException, java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Future<V>java.lang.InterruptedExceptionjava.util.concurrent.TimeoutExceptionjava.util.concurrent.ExecutionExceptionpublic final int hashCode()
hashCode in class java.lang.Objectpublic final boolean equals(java.lang.Object obj)
equals in class java.lang.Object