public class TrackingEventProcessorConfiguration extends Object
TrackingEventProcessor
. The TrackingEventProcessorConfiguration provides access to the options to tweak
various settings. Instances are not thread-safe and should not be altered after they have been used to initialize
a TrackingEventProcessor.Modifier and Type | Method and Description |
---|---|
TrackingEventProcessorConfiguration |
andBatchSize(int batchSize) |
TrackingEventProcessorConfiguration |
andInitialSegmentsCount(int segmentsSize) |
TrackingEventProcessorConfiguration |
andThreadFactory(Function<String,ThreadFactory> threadFactory)
Sets the ThreadFactory to use to create the threads to process events on.
|
static TrackingEventProcessorConfiguration |
forParallelProcessing(int threadCount)
Initialize a configuration instance with the given
threadCount . |
static TrackingEventProcessorConfiguration |
forSingleThreadedProcessing()
Initialize a configuration with single threaded processing.
|
int |
getBatchSize() |
int |
getInitialSegmentsCount() |
int |
getMaxThreadCount() |
ThreadFactory |
getThreadFactory(String processorName)
Provides the ThreadFactory to use to construct Threads for the processor with given
processorName |
public static TrackingEventProcessorConfiguration forSingleThreadedProcessing()
public static TrackingEventProcessorConfiguration forParallelProcessing(int threadCount)
threadCount
. This is both the number of threads
that a processor will start for processing, as well as the initial number of segments that will be created when
the processor is first started.threadCount
- the number of segments to process in parallelpublic TrackingEventProcessorConfiguration andBatchSize(int batchSize)
batchSize
- The maximum number of events to process in a single batch.this
for method chainingpublic TrackingEventProcessorConfiguration andInitialSegmentsCount(int segmentsSize)
segmentsSize
- The number of segments requested for handling asynchronous processing of events.this
for method chainingpublic TrackingEventProcessorConfiguration andThreadFactory(Function<String,ThreadFactory> threadFactory)
threadFactory
- The factory to create threads withthis
for method chainingpublic int getBatchSize()
public int getInitialSegmentsCount()
public int getMaxThreadCount()
ThreadPoolExecutor.getCorePoolSize()
public ThreadFactory getThreadFactory(String processorName)
processorName
processorName
- The name of the processor for which to return the ThreadFactoryCopyright © 2010–2017. All rights reserved.