public class TerminableIntermediateFuture<E> extends IntermediateFuture<E> implements ITerminableIntermediateFuture<E>
IForwardCommandFuture.Type
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 |
addBackwardCommand(IFilter<Object> filter,
ICommand<Object> command)
Add a backward command with a filter.
|
ITerminationCommand |
getTerminationCommand()
Get the terminate.
|
void |
removeBackwardCommand(ICommand<Object> command)
Add a command with a filter.
|
void |
sendBackwardCommand(Object info)
Send a backward command in direction of the source.
|
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, getNextIntermediateResult, hasNextIntermediateResult, setFinished, setFinishedIfUndone, setResult, setResultIfUndone
abortGet, addForwardCommand, get, get, get, get, getEmptyFuture, getException, isDone, removeForwardCommand, sendForwardCommand, setException, setExceptionIfUndone
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIntermediateResults, getNextIntermediateResult, hasNextIntermediateResult
addResultListener, get, get, 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.public void sendBackwardCommand(Object info)
sendBackwardCommand
in interface IBackwardCommandFuture
info
- The command info.public void addBackwardCommand(IFilter<Object> filter, ICommand<Object> command)
Copyright © 2013. All Rights Reserved.