public class TerminableIntermediateFuture<E> extends IntermediateFuture<E> implements ITerminableIntermediateFuture<E>
IForwardCommandFuture.Type| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<ICommand<java.lang.Object>,IFilter<java.lang.Object>> |
bcommands
The list of backward commands.
|
protected ITerminationCommand |
terminate
The termination code.
|
icallers, indices, intermediate, results, scheduledCALLER_QUEUED, CALLER_RESUMED, CALLER_SUSPENDED, callers, creation, DEBUG, exception, fcommands, first, listener, listeners, NO_STACK_COMPACTION, NONE, result, resultavailable, STACK, undone, UNSETDONE| Constructor and Description |
|---|
TerminableIntermediateFuture()
Create a new future.
|
TerminableIntermediateFuture(java.lang.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<java.lang.Object> filter,
ICommand<java.lang.Object> command)
Add a backward command with a filter.
|
ITerminationCommand |
getTerminationCommand()
Get the terminate.
|
void |
removeBackwardCommand(ICommand<java.lang.Object> command)
Add a command with a filter.
|
void |
sendBackwardCommand(java.lang.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(java.lang.Exception reason)
Terminate the future and supply a custom reason.
|
addIntermediateResult, addIntermediateResultIfUndone, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addResult, addResultListener, doAddIntermediateResult, doGetNextIntermediateResult, doNotifyListener, doSetFinished, doSetResult, flatMapAsync, getIntermediateResults, getNextIntermediateResult, getNextIntermediateResult, getNextIntermediateResult, hasNextIntermediateResult, mapAsync, mapAsync, notifyIntermediateResult, notifyListener, resume, resumeIntermediate, scheduleNotification, setFinished, setFinishedIfUndone, startScheduledNotificationsabortGet, acceptEither, addForwardCommand, addResultListener, addResultListener, applyToEither, doSetException, get, get, get, get, get, getEmptyFuture, getException, getFuture, hasResultListener, isDone, notifyListenerCommand, removeForwardCommand, sendForwardCommand, setException, setExceptionIfUndone, setResult, setResultIfUndone, thenAccept, thenAccept, thenApply, thenApply, thenCombine, thenCompose, thenComposeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, flatMapAsync, getIntermediateResults, getNextIntermediateResult, hasNextIntermediateResult, mapAsync, mapAsyncacceptEither, addResultListener, addResultListener, addResultListener, applyToEither, get, get, get, get, get, getException, isDone, thenAccept, thenAccept, thenApply, thenApply, thenCombine, thenCompose, thenComposeprotected ITerminationCommand terminate
public TerminableIntermediateFuture()
public TerminableIntermediateFuture(java.lang.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<java.util.Collection<E>>public void terminate(java.lang.Exception reason)
terminate in interface ITerminableFuture<java.util.Collection<E>>public ITerminationCommand getTerminationCommand()
public void setTerminationCommand(ITerminationCommand terminate)
terminate - The terminate to set.public void sendBackwardCommand(java.lang.Object info)
sendBackwardCommand in interface IBackwardCommandFutureinfo - The command info.public void addBackwardCommand(IFilter<java.lang.Object> filter, ICommand<java.lang.Object> command)
public void removeBackwardCommand(ICommand<java.lang.Object> command)