public class ThreadPoolFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ThreadPoolFactory.ProcessingLibraryThreadPoolExecutor
When unexpected behavior happened, for example runtimeException.
|
Constructor and Description |
---|
ThreadPoolFactory(int threadCount,
ExceptionHandler exceptionHandler)
A factory to create an instance of ExecutorService based on configuration
|
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.ExecutorService |
createMainThreadPool()
Create an instance of ExecutorService.
|
java.util.concurrent.ScheduledExecutorService |
createScheduledThreadPool(int numOfParallelReaders)
Create an instance of ScheduledExecutorService.
|
public ThreadPoolFactory(int threadCount, ExceptionHandler exceptionHandler)
threadCount
- number of threadsexceptionHandler
- instance of ExceptionHandler
public java.util.concurrent.ScheduledExecutorService createScheduledThreadPool(int numOfParallelReaders)
public java.util.concurrent.ExecutorService createMainThreadPool()
ExecutorService
that processes CloudTrailSource
.