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 |
---|---|
ITerminationCommand |
getTerminationCommand()
Get the terminate.
|
void |
setTerminationCommand(ITerminationCommand terminate)
Set the terminate.
|
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>>
public ITerminationCommand getTerminationCommand()
public void setTerminationCommand(ITerminationCommand terminate)
terminate
- The terminate to set.Copyright © 2012. All Rights Reserved.