public class TerminableIntermediateDelegationFuture<E> extends IntermediateFuture<E> implements ITerminableIntermediateFuture<E>
IForwardCommandFuture.Type
Modifier and Type | Field and Description |
---|---|
protected boolean |
notified
Flag if source has been notified.
|
protected boolean |
notify
Flag if source has to be notified.
|
protected java.lang.Exception |
reason
Exception used for notification.
|
protected ITerminableIntermediateFuture<?> |
src
The termination source.
|
protected java.util.List<java.lang.Object> |
storedinfos
The list of stored infos, to be sent when src is connected.
|
icallers, indices, intermediate, results, scheduled
CALLER_QUEUED, CALLER_RESUMED, CALLER_SUSPENDED, callers, creation, DEBUG, exception, fcommands, first, listener, listeners, NO_STACK_COMPACTION, NONE, result, resultavailable, STACK, undone, UNSET
DONE
Constructor and Description |
---|
TerminableIntermediateDelegationFuture()
Create a new future.
|
TerminableIntermediateDelegationFuture(ITerminableIntermediateFuture<?> src)
Create a new future.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doNotify()
Possibly notify the termination source.
|
ITerminableIntermediateFuture<?> |
getSource()
Get the src.
|
void |
sendBackwardCommand(java.lang.Object info)
Send a backward command in direction of the source.
|
void |
setSource(ITerminableIntermediateFuture<?> src)
Set the source.
|
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, startScheduledNotifications
abortGet, 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, thenCompose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, flatMapAsync, getIntermediateResults, getNextIntermediateResult, hasNextIntermediateResult, mapAsync, mapAsync
acceptEither, addResultListener, addResultListener, addResultListener, applyToEither, get, get, get, get, get, getException, isDone, thenAccept, thenAccept, thenApply, thenApply, thenCombine, thenCompose, thenCompose
protected ITerminableIntermediateFuture<?> src
protected boolean notify
protected boolean notified
protected java.lang.Exception reason
protected java.util.List<java.lang.Object> storedinfos
public TerminableIntermediateDelegationFuture()
public TerminableIntermediateDelegationFuture(ITerminableIntermediateFuture<?> src)
public void setSource(ITerminableIntermediateFuture<?> src)
public ITerminableIntermediateFuture<?> getSource()
protected void doNotify()
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 void sendBackwardCommand(java.lang.Object info)
sendBackwardCommand
in interface IBackwardCommandFuture
info
- The command info.