org.eclipse.smila.processing.util
Class ResultCollector
java.lang.Object
org.eclipse.smila.processing.util.ResultCollector
public class ResultCollector
- extends java.lang.Object
Helper class that can/should be used by pipelets for collecting their processed record results.
Takes into account that error results may cause an exception ("_failOnError" parameter) or may be dropped from
pipelet result (see dropRecordOnError).
- Author:
- aweber
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResultCollector
public ResultCollector(ParameterAccessor paramAccessor,
Log log,
boolean dropRecordOnError)
- Parameters:
paramAccessor - needed to access failOnError parameterlog - the log for which to log the error resultsdropRecordOnError -
addResult
public void addResult(java.lang.String recordId)
- Parameters:
recordId - record id of successful result
addFailedResult
public void addFailedResult(java.lang.String recordId,
java.lang.Exception ex)
throws ProcessingException
- Parameters:
recordId - record id of failed resultex - exception that will be logged resp. thrown if failOnError=true
- Throws:
ProcessingException - will be thrown if failOnError=true
getResultIds
public java.lang.String[] getResultIds()
- Returns:
- record ids that should be used as pipelet result