public class TerminableIntermediateFuture<E> extends IntermediateFuture<E> implements ITerminableIntermediateFuture<E>
DEBUG, EMPTY, NO_STACK_COMPACTION, STACK
DONE
Constructor and Description |
---|
TerminableIntermediateFuture()
Create a new future.
|
TerminableIntermediateFuture(Exception exception)
Create a future that is already done (failed).
|
TerminableIntermediateFuture(ITerminationCommand terminate)
Create a new future.
|
Modifier and Type | Method and Description |
---|---|
void |
terminate()
Terminate the future.
|
void |
terminate(Exception reason)
Terminate the future and supply a custom reason.
|
addIntermediateResult, addIntermediateResultIfUndone, addResultListener, getIntermediateResults, getNextIntermediateResult, hasNextIntermediateResult, setFinished, setFinishedIfUndone, setResult, setResultIfUndone
get, get, getEmptyFuture, getException, isDone, setException, setExceptionIfUndone
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIntermediateResults, getNextIntermediateResult, hasNextIntermediateResult
addResultListener, get, get, getException, isDone
public TerminableIntermediateFuture()
public TerminableIntermediateFuture(Exception exception)
exception
- The exception.public TerminableIntermediateFuture(ITerminationCommand terminate)
terminate
- The runnable to be executed in case of termination.public void terminate()
terminate
in interface ITerminableFuture<Collection<E>>
public void terminate(Exception reason)
terminate
in interface ITerminableFuture<Collection<E>>
Copyright © 2012. All Rights Reserved.