public interface IIntermediateFuture<E> extends IFuture<java.util.Collection<E>>
Modifier and Type | Field and Description |
---|---|
static IntermediateFuture<java.lang.Void> |
DONE
A future representing a completed action.
|
Modifier and Type | Method and Description |
---|---|
void |
addIntermediateResultListener(IFunctionalResultListener<E> intermediateListener)
Add a functional result listener, which called on intermediate results.
|
void |
addIntermediateResultListener(IFunctionalResultListener<E> intermediateListener,
IFunctionalResultListener<java.lang.Void> finishedListener)
Add a functional result listener, which called on intermediate results.
|
void |
addIntermediateResultListener(IFunctionalResultListener<E> intermediateListener,
IFunctionalResultListener<java.lang.Void> finishedListener,
IFunctionalExceptionListener exceptionListener)
Add a functional result listener, which called on intermediate results.
|
void |
addIntermediateResultListener(IIntermediateResultListener<E> intermediateListener)
Add a result listener.
|
<R> IIntermediateFuture<R> |
flatMapAsync(Function<E,IIntermediateFuture<R>> function)
Implements async loop and applies a an async multi-function to each element.
|
java.util.Collection<E> |
getIntermediateResults()
Get the intermediate results that are currently available.
|
E |
getNextIntermediateResult()
Iterate over the intermediate results in a blocking fashion.
|
boolean |
hasNextIntermediateResult()
Check if there are more results for iteration for the given caller.
|
<R> IIntermediateFuture<R> |
mapAsync(Function<E,IFuture<R>> function)
Implements async loop and applies a an async function to each element.
|
<R> IIntermediateFuture<R> |
mapAsync(Function<E,IFuture<R>> function,
java.lang.Class<?> futuretype)
Implements async loop and applies a an async function to each element.
|
acceptEither, addResultListener, addResultListener, addResultListener, applyToEither, get, get, getException, isDone, thenAccept, thenAccept, thenApply, thenApply, thenCombine, thenCompose, thenCompose
static final IntermediateFuture<java.lang.Void> DONE
java.util.Collection<E> getIntermediateResults()
boolean hasNextIntermediateResult()
E getNextIntermediateResult()
NoSuchElementException,
- when there are no more intermediate results and the future is finished.void addIntermediateResultListener(IIntermediateResultListener<E> intermediateListener)
intermediateListener
- The intermediate listener.void addIntermediateResultListener(IFunctionalResultListener<E> intermediateListener)
intermediateListener
- The intermediate listener.void addIntermediateResultListener(IFunctionalResultListener<E> intermediateListener, IFunctionalResultListener<java.lang.Void> finishedListener)
intermediateListener
- The intermediate listener.finishedListener
- The finished listener, called when no more
intermediate results will arrive. If null
, the finish
event will be ignored.void addIntermediateResultListener(IFunctionalResultListener<E> intermediateListener, IFunctionalResultListener<java.lang.Void> finishedListener, IFunctionalExceptionListener exceptionListener)
intermediateListener
- The intermediate listener.finishedListener
- The finished listener, called when no more
intermediate results will arrive. If null
, the finish
event will be ignored.exListener
- The listener that is called on exceptions. Passing
null
enables default exception logging.<R> IIntermediateFuture<R> mapAsync(Function<E,IFuture<R>> function)
function
- The function.<R> IIntermediateFuture<R> mapAsync(Function<E,IFuture<R>> function, java.lang.Class<?> futuretype)
function
- The function.<R> IIntermediateFuture<R> flatMapAsync(Function<E,IIntermediateFuture<R>> function)
function
- The function.