Class BeanExecutor<T>

Type Parameters:
T - The type of the bean being converted
All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService, Spliterator<String[]>

public class BeanExecutor<T> extends IntolerantThreadPoolExecutor<String[]>
A specific derivative of IntolerantThreadPoolExecutor intended for submitting beans to be converted to Strings for writing.
Since:
5.0
  • Constructor Details

    • BeanExecutor

      public BeanExecutor(boolean orderedResults, Locale errorLocale)
      The only constructor available for this class.
      Parameters:
      orderedResults - Whether order should be preserved in the results
      errorLocale - The locale to use for error messages
  • Method Details

    • submitBean

      public void submitBean(long lineNumber, MappingStrategy<T> mappingStrategy, T bean, CsvExceptionHandler exceptionHandler)
      Submit one bean for conversion.
      Parameters:
      lineNumber - Which record in the output file is being processed
      mappingStrategy - The mapping strategy to be used
      bean - The bean to be transformed into a line of output
      exceptionHandler - The handler for exceptions thrown during record processing