public class Tuple2Future<E,F> extends IntermediateFuture<TupleResult> implements ITuple2Future<E,F>
IForwardCommandFuture.TypeDEBUG, EMPTY, NO_STACK_COMPACTION, STACKDONE| Constructor and Description |
|---|
Tuple2Future()
Create a future that is already done.
|
Tuple2Future(E result1,
F result2)
Create a future that is already done.
|
Tuple2Future(Exception exception)
Create a future that is already done (failed).
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTuple2ResultListener(IFunctionalResultListener<E> firstListener,
IFunctionalResultListener<F> secondListener)
Uses two functional result listeners to create a Tuple2ResultListener and add it.
|
void |
addTuple2ResultListener(IFunctionalResultListener<E> firstListener,
IFunctionalResultListener<F> secondListener,
IFunctionalExceptionListener exceptionListener)
Uses two functional result listeners to create a Tuple2ResultListener and add it.
|
E |
getFirstResult()
Get the first result.
|
E |
getFirstResult(ISuspendable caller)
Get the first result.
|
F |
getSecondResult()
Get the second result.
|
F |
getSecondResult(ISuspendable caller)
Get the second result.
|
void |
setFirstResult(E result)
Set the result.
|
void |
setFirstResultIfUndone(E result)
Set the result.
|
void |
setSecondResult(F result)
Set the result.
|
void |
setSecondResultIfUndone(F result)
Set the result.
|
addIntermediateResult, addIntermediateResultIfUndone, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addResultListener, getIntermediateResults, getNextIntermediateResult, getNextIntermediateResult, hasNextIntermediateResult, setFinished, setFinishedIfUndone, setResult, setResultIfUndoneabortGet, addForwardCommand, addResultListener, addResultListener, get, get, get, get, getEmptyFuture, getException, isDone, removeForwardCommand, sendForwardCommand, setException, setExceptionIfUndoneequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, addIntermediateResultListener, getIntermediateResults, getNextIntermediateResult, hasNextIntermediateResultaddResultListener, addResultListener, addResultListener, get, get, get, get, getException, isDonepublic Tuple2Future()
result - The result, if any.public Tuple2Future(E result1, F result2)
result - The result, if any.public Tuple2Future(Exception exception)
exception - The exception.public E getFirstResult()
getFirstResult in interface ITuple2Future<E,F>NoSuchElementException, - when there are no more intermediate results and the future is finished.public E getFirstResult(ISuspendable caller)
getFirstResult in interface ITuple2Future<E,F>NoSuchElementException, - when there are no more intermediate results and the future is finished.public F getSecondResult()
getSecondResult in interface ITuple2Future<E,F>NoSuchElementException, - when there are no more intermediate results and the future is finished.public F getSecondResult(ISuspendable caller)
getSecondResult in interface ITuple2Future<E,F>NoSuchElementException, - when there are no more intermediate results and the future is finished.public void setFirstResult(E result)
result - The result.public void setSecondResult(F result)
result - The result.public void setFirstResultIfUndone(E result)
result - The result.public void addTuple2ResultListener(IFunctionalResultListener<E> firstListener, IFunctionalResultListener<F> secondListener)
addTuple2ResultListener in interface ITuple2Future<E,F>firstListener - Listener for the first available result.secondListener - Listener for the second available result.public void addTuple2ResultListener(IFunctionalResultListener<E> firstListener, IFunctionalResultListener<F> secondListener, IFunctionalExceptionListener exceptionListener)
addTuple2ResultListener in interface ITuple2Future<E,F>firstListener - Listener for the first available result.secondListener - Listener for the second available result.exListener - The listener that is called on exceptions. Passing
null enables default exception logging.public void setSecondResultIfUndone(F result)
result - The result.Copyright © 2015. All Rights Reserved.