K
- The type of this Future
V
- The type of the wrapped Future
public 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) |
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.ExecutionException
java.lang.InterruptedException
public 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.InterruptedException
java.util.concurrent.TimeoutException
java.util.concurrent.ExecutionException
public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object