public class DelegatingRunnableFuture<V> extends Object implements RunnableFuture<V>
| Constructor and Description |
|---|
DelegatingRunnableFuture(Callable<V> task) |
DelegatingRunnableFuture(Runnable command,
V value) |
public DelegatingRunnableFuture(Runnable command, V value)
public DelegatingRunnableFuture(Callable<V> task)
public Runnable getCommand()
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>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 void run()
run in interface Runnablerun in interface RunnableFuture<V>