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, notcommand, results
CALLER_QUEUED, CALLER_RESUMED, CALLER_SUSPENDED, callers, creation, DEBUG, exception, first, listener, listeners, NO_STACK_COMPACTION, NONE, notifications, 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, addIntermediateResultListener, addResultListener, doAddIntermediateResult, doGetNextIntermediateResult, doSetFinished, doSetResult, flatMapAsync, getIntermediateResults, getNextIntermediateResult, getNextIntermediateResult, getNextIntermediateResult, getNotificationCommand, hasNextIntermediateResult, hasNextIntermediateResult, mapAsync, mapAsync, notifyIntermediateResult, resume, resumeIntermediate, setFinished, setFinishedIfUndone, storeResult
abortGet, acceptEither, addResultListener, addResultListener, applyToEither, delegate, doSetException, exceptionally, exceptionally, exceptionally, executeNotification, get, get, get, get, get, getEmptyFuture, getException, getFuture, hasResultListener, isDone, notifyListener, notifyListener, scheduleNotification, scheduleNotification, scheduleNotification, sendForwardCommand, setException, setExceptionIfUndone, setResult, setResultIfUndone, startScheduledNotifications, thenAccept, thenAccept, thenApply, thenApply, thenCombine, thenCompose, thenCompose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, flatMapAsync, getIntermediateResults, getNextIntermediateResult, getNextIntermediateResult, hasNextIntermediateResult, hasNextIntermediateResult, mapAsync, mapAsync
acceptEither, addResultListener, addResultListener, addResultListener, applyToEither, delegate, exceptionally, exceptionally, exceptionally, 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.