Class ChunkingCollector
java.lang.Object
kieker.monitoring.writer.AbstractMonitoringWriter
kieker.monitoring.writer.collector.ChunkingCollector
public class ChunkingCollector extends AbstractMonitoringWriter
Chunking collector for monitoring records. The collected records are written if a chunk is
"full", or if no records have been written for some time (see 'deferred write delay'). This
collector employs a writer task, which runs regularly and writes chunks if enough records have
been collected or the deferred write delay has expired.
Configuration hints: The collector has several configuration parameters which depend
on one another. In particular, the queue size should be chosen large enough so that the queue
does not fill up in a single task run interval. In addition, the output buffer needs to be
large enough to hold a completely serialized chunk, and therefore depends on the chunk size.
- Since:
- 1.13
- Author:
- Holger Knoche
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_CHUNK_SIZEThe name of the configuration property for the chunk size.static java.lang.StringCONFIG_DEFERRED_WRITE_DELAYThe name of the configuration property for the deferred write delay.static java.lang.StringCONFIG_OUTPUT_BUFFER_SIZEThe name of the configuration property for the output buffer size.static java.lang.StringCONFIG_QUEUE_SIZEThe name of the configuration property for the queue size.static java.lang.StringCONFIG_QUEUE_TYPEThe type of queue to use.static java.lang.StringCONFIG_SERIALIZER_CLASSNAMEThe name of the configuration property for the serializer class name.static java.lang.StringCONFIG_TASK_RUN_INTERVALThe name of the configuration property for the writer task interval.static java.lang.StringCONFIG_WRITER_CLASSNAMEThe name of the configuration property for the writer class name. -
Constructor Summary
Constructors Constructor Description ChunkingCollector(Configuration configuration)Create a chunking collector. -
Method Summary
Modifier and Type Method Description java.util.Queue<IMonitoringRecord>getRecordQueue()voidonStarting()This event fires when Kieker has been initialized and is ready to monitor.voidonTerminating()This event fires when Kieker has been notified to terminate.voidwriteMonitoringRecord(IMonitoringRecord record)This event fires when Kieker has received a new record.
-
Field Details
-
CONFIG_SERIALIZER_CLASSNAME
public static final java.lang.String CONFIG_SERIALIZER_CLASSNAMEThe name of the configuration property for the serializer class name. -
CONFIG_WRITER_CLASSNAME
public static final java.lang.String CONFIG_WRITER_CLASSNAMEThe name of the configuration property for the writer class name. -
CONFIG_DEFERRED_WRITE_DELAY
public static final java.lang.String CONFIG_DEFERRED_WRITE_DELAYThe name of the configuration property for the deferred write delay. -
CONFIG_QUEUE_SIZE
public static final java.lang.String CONFIG_QUEUE_SIZEThe name of the configuration property for the queue size. -
CONFIG_CHUNK_SIZE
public static final java.lang.String CONFIG_CHUNK_SIZEThe name of the configuration property for the chunk size. -
CONFIG_OUTPUT_BUFFER_SIZE
public static final java.lang.String CONFIG_OUTPUT_BUFFER_SIZEThe name of the configuration property for the output buffer size. -
CONFIG_TASK_RUN_INTERVAL
public static final java.lang.String CONFIG_TASK_RUN_INTERVALThe name of the configuration property for the writer task interval. -
CONFIG_QUEUE_TYPE
public static final java.lang.String CONFIG_QUEUE_TYPEThe type of queue to use.
-
-
Constructor Details
-
ChunkingCollector
Create a chunking collector.- Parameters:
configuration- kieker configuration with all parameters
-
-
Method Details
-
onStarting
public void onStarting()Description copied from class:AbstractMonitoringWriterThis event fires when Kieker has been initialized and is ready to monitor. It is executed by theMonitoringWriterThreadjust before reading the writer queue.- Specified by:
onStartingin classAbstractMonitoringWriter
-
onTerminating
public void onTerminating()Description copied from class:AbstractMonitoringWriterThis event fires when Kieker has been notified to terminate. It is executed by theMonitoringWriterThreadjust after finishing the writer queue.- Specified by:
onTerminatingin classAbstractMonitoringWriter
-
writeMonitoringRecord
Description copied from class:AbstractMonitoringWriterThis event fires when Kieker has received a new record.- Specified by:
writeMonitoringRecordin classAbstractMonitoringWriter
-
getRecordQueue
-