Class BeanExecutor<T>

  • Type Parameters:
    T - The type of the bean being converted
    All Implemented Interfaces:
    java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.Spliterator<java.lang.String[]>

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

      • Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor

        java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
      • Nested classes/interfaces inherited from interface java.util.Spliterator

        java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,​T_CONS extends java.lang.Object,​T_SPLITR extends java.util.Spliterator.OfPrimitive<T,​T_CONS,​T_SPLITR>>
    • Constructor Summary

      Constructors 
      Constructor Description
      BeanExecutor​(boolean orderedResults, java.util.Locale errorLocale)
      The only constructor available for this class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void submitBean​(long lineNumber, MappingStrategy<T> mappingStrategy, T bean, CsvExceptionHandler exceptionHandler)
      Submit one bean for conversion.
      • Methods inherited from class java.util.concurrent.ThreadPoolExecutor

        allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, terminated, toString
      • Methods inherited from class java.util.concurrent.AbstractExecutorService

        invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Spliterator

        forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics
    • Constructor Detail

      • BeanExecutor

        public BeanExecutor​(boolean orderedResults,
                            java.util.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 Detail

      • 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