public class CUFuture<V,C>
extends java.lang.Object
implements java.util.concurrent.Future<V>, java.lang.Comparable<C>
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.Future<V> |
delegate |
protected ManagedTaskListenerTask |
listener |
Constructor and Description |
---|
CUFuture(java.util.concurrent.Future<V> delegate,
ManagedTaskListenerTask listener) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
int |
compareTo(C o) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
protected final java.util.concurrent.Future<V> delegate
protected final ManagedTaskListenerTask listener
public CUFuture(java.util.concurrent.Future<V> delegate, ManagedTaskListenerTask listener)
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.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException