Package com.opencsv.bean.concurrent
Class BeanExecutor<T>
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- com.opencsv.bean.concurrent.IntolerantThreadPoolExecutor<java.lang.String[]>
-
- com.opencsv.bean.concurrent.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 ofIntolerantThreadPoolExecutor
intended for submitting beans to be converted toString
s 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>>
-
-
Field Summary
-
Fields inherited from class com.opencsv.bean.concurrent.IntolerantThreadPoolExecutor
accumulateThread, errorLocale, expectedRecords, resultQueue, thrownExceptionsQueue
-
-
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 com.opencsv.bean.concurrent.IntolerantThreadPoolExecutor
afterExecute, characteristics, checkExceptions, complete, estimateSize, getCapturedExceptions, getTerminalException, prepare, shutdownNow, tryAdvance, trySplit
-
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
-
-
-
-
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 processedmappingStrategy
- The mapping strategy to be usedbean
- The bean to be transformed into a line of outputexceptionHandler
- The handler for exceptions thrown during record processing
-
-