public class TerminableFuture<E> extends Future<E> implements ITerminableFuture<E>
DEBUG, EMPTY, NO_STACK_COMPACTION, STACK| Constructor and Description |
|---|
TerminableFuture()
Create a new future.
|
TerminableFuture(ITerminationCommand terminate)
Create a future that is already done.
|
| Modifier and Type | Method and Description |
|---|---|
void |
terminate()
Terminate the future.
|
void |
terminate(Exception reason)
Terminate the future and supply a custom reason.
|
addResultListener, get, get, getEmptyFuture, getException, isDone, setException, setExceptionIfUndone, setResult, setResultIfUndoneequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddResultListener, get, get, getException, isDonepublic TerminableFuture()
public TerminableFuture(ITerminationCommand terminate)
result - The result, if any.public void terminate()
terminate in interface ITerminableFuture<E>public void terminate(Exception reason)
terminate in interface ITerminableFuture<E>Copyright © 2012. All Rights Reserved.