public class FlattenMultiplexCollector extends java.lang.Object implements IMultiplexCollector
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.Object> |
callresults
The list of results (if ret is not intermediate future).
|
protected java.util.List<Future<java.lang.Void>> |
calls
The list of calls.
|
protected boolean |
flatten
Flag if flatten.
|
protected Future<java.lang.Object> |
fut
The future.
|
Constructor and Description |
---|
FlattenMultiplexCollector() |
Modifier and Type | Method and Description |
---|---|
protected void |
addResult(java.lang.Object result)
Add a result.
|
void |
exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.
|
void |
finished()
Declare that the future is finished.
|
void |
init(Future<java.lang.Object> fut,
java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.reflect.Method muxmethod)
Init to share code.
|
void |
intermediateResultAvailable(java.lang.Object result)
Called when an intermediate result is available.
|
void |
resultAvailable(java.util.Collection<java.lang.Object> result)
Called when the result is available.
|
protected void |
setException(java.lang.Exception exception)
Set an exception.
|
protected void |
setFinished()
Set finished.
|
protected Future<java.lang.Object> fut
protected boolean flatten
protected java.util.List<Future<java.lang.Void>> calls
protected java.util.List<java.lang.Object> callresults
public void init(Future<java.lang.Object> fut, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.reflect.Method muxmethod)
init
in interface IMultiplexCollector
public void intermediateResultAvailable(java.lang.Object result)
IIntermediateResultListener
intermediateResultAvailable
in interface IIntermediateResultListener<java.lang.Object>
result
- The result.public void finished()
IIntermediateResultListener
finished
in interface IIntermediateResultListener<java.lang.Object>
public void resultAvailable(java.util.Collection<java.lang.Object> result)
IIntermediateResultListener
resultAvailable
in interface IFunctionalResultListener<java.util.Collection<java.lang.Object>>
resultAvailable
in interface IIntermediateResultListener<java.lang.Object>
result
- The final result.public void exceptionOccurred(java.lang.Exception exception)
IFunctionalExceptionListener
exceptionOccurred
in interface IFunctionalExceptionListener
exception
- The exception.protected void addResult(java.lang.Object result)
result
- The result.protected void setFinished()
protected void setException(java.lang.Exception exception)
exception
- The exception.