T - The type of the object to be returned.public class VTNFutureTask<T> extends FutureTask<T> implements VTNFuture<T>
FutureTask that also implements
VTNFuture.| Constructor and Description |
|---|
VTNFutureTask(Callable<T> callable)
Construct a new instance.
|
VTNFutureTask(Runnable runnable,
T result)
Create a
VTNFutureTask instance that will execute the given
runnable. |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Runnable listener,
Executor executor)
Add a listener to be executed on the specified executor.
|
protected void |
done()
Invoked when this task completed.
|
cancel, get, get, isCancelled, isDone, run, runAndReset, set, setExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckedGet, checkedGetpublic VTNFutureTask(Callable<T> callable)
callable - A Callable task.public VTNFutureTask(Runnable runnable, T result)
VTNFutureTask instance that will execute the given
runnable.runnable - A Runnable task.result - The result to return on successful task completion.public final void addListener(Runnable listener, Executor executor)
addListener in interface com.google.common.util.concurrent.ListenableFuture<T>listener - A listener to run when the computation is complete.executor - A executor to run the given listener on.protected final void done()
done in class FutureTask<T>Copyright © 2018 OpenDaylight. All rights reserved.