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
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String CONFIG_CHUNK_SIZE
    The name of the configuration property for the chunk size.
    static java.lang.String CONFIG_DEFERRED_WRITE_DELAY
    The name of the configuration property for the deferred write delay.
    static java.lang.String CONFIG_OUTPUT_BUFFER_SIZE
    The name of the configuration property for the output buffer size.
    static java.lang.String CONFIG_QUEUE_SIZE
    The name of the configuration property for the queue size.
    static java.lang.String CONFIG_QUEUE_TYPE
    The type of queue to use.
    static java.lang.String CONFIG_SERIALIZER_CLASSNAME
    The name of the configuration property for the serializer class name.
    static java.lang.String CONFIG_TASK_RUN_INTERVAL
    The name of the configuration property for the writer task interval.
    static java.lang.String CONFIG_WRITER_CLASSNAME
    The name of the configuration property for the writer class name.

    Fields inherited from class kieker.monitoring.writer.AbstractMonitoringWriter

    configuration
  • Constructor Summary

    Constructors 
    Constructor Description
    ChunkingCollector​(kieker.common.configuration.Configuration configuration)
    Create a chunking collector.
  • Method Summary

    Modifier and Type Method Description
    java.util.Queue<kieker.common.record.IMonitoringRecord> getRecordQueue()  
    void onStarting()
    This event fires when Kieker has been initialized and is ready to monitor.
    void onTerminating()
    This event fires when Kieker has been notified to terminate.
    void writeMonitoringRecord​(kieker.common.record.IMonitoringRecord record)
    This event fires when Kieker has received a new record.

    Methods inherited from class kieker.monitoring.writer.AbstractMonitoringWriter

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • CONFIG_SERIALIZER_CLASSNAME

      public static final java.lang.String CONFIG_SERIALIZER_CLASSNAME
      The name of the configuration property for the serializer class name.
    • CONFIG_WRITER_CLASSNAME

      public static final java.lang.String CONFIG_WRITER_CLASSNAME
      The name of the configuration property for the writer class name.
    • CONFIG_DEFERRED_WRITE_DELAY

      public static final java.lang.String CONFIG_DEFERRED_WRITE_DELAY
      The name of the configuration property for the deferred write delay.
    • CONFIG_QUEUE_SIZE

      public static final java.lang.String CONFIG_QUEUE_SIZE
      The name of the configuration property for the queue size.
    • CONFIG_CHUNK_SIZE

      public static final java.lang.String CONFIG_CHUNK_SIZE
      The name of the configuration property for the chunk size.
    • CONFIG_OUTPUT_BUFFER_SIZE

      public static final java.lang.String CONFIG_OUTPUT_BUFFER_SIZE
      The name of the configuration property for the output buffer size.
    • CONFIG_TASK_RUN_INTERVAL

      public static final java.lang.String CONFIG_TASK_RUN_INTERVAL
      The name of the configuration property for the writer task interval.
    • CONFIG_QUEUE_TYPE

      public static final java.lang.String CONFIG_QUEUE_TYPE
      The type of queue to use.
  • Constructor Details

    • ChunkingCollector

      public ChunkingCollector​(kieker.common.configuration.Configuration configuration)
      Create a chunking collector.
      Parameters:
      configuration - kieker configuration with all parameters
  • Method Details