Class StringSerializer

java.lang.Object
kieker.monitoring.writer.serializer.AbstractMonitoringRecordSerializer
kieker.monitoring.writer.serializer.StringSerializer
All Implemented Interfaces:
IMonitoringRecordSerializer

public class StringSerializer
extends AbstractMonitoringRecordSerializer
String serializer for monitoring records based on the record's toString method.
Since:
1.13
Author:
Holger Knoche
  • Constructor Summary

    Constructors 
    Constructor Description
    StringSerializer​(Configuration configuration)
    Creates a new serializer using the given configuration.
  • Method Summary

    Modifier and Type Method Description
    void onInitialization()
    Called by the collector during initialization (before any records are written).
    void onTermination()
    Called by the collector upon termination (after remaining records have been flushed).
    int serializeRecord​(IMonitoringRecord record, java.nio.ByteBuffer buffer)
    Serializes a single record into the given byte buffer.
    int serializeRecords​(java.util.Collection<IMonitoringRecord> records, java.nio.ByteBuffer buffer)
    Serializes multiple monitoring records into the given byte buffer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StringSerializer

      public StringSerializer​(Configuration configuration)
      Creates a new serializer using the given configuration.
      Parameters:
      configuration - The configuration to use
  • Method Details

    • serializeRecord

      public int serializeRecord​(IMonitoringRecord record, java.nio.ByteBuffer buffer)
      Description copied from interface: IMonitoringRecordSerializer
      Serializes a single record into the given byte buffer.
      Parameters:
      record - The record to serialize
      buffer - The buffer to write to
      Returns:
      The number of bytes written to the buffer
    • serializeRecords

      public int serializeRecords​(java.util.Collection<IMonitoringRecord> records, java.nio.ByteBuffer buffer)
      Description copied from interface: IMonitoringRecordSerializer
      Serializes multiple monitoring records into the given byte buffer.
      Parameters:
      records - The records to serialize
      buffer - The buffer to write to
      Returns:
      The number of bytes written to the buffer
    • onInitialization

      public void onInitialization()
      Description copied from interface: IMonitoringRecordSerializer
      Called by the collector during initialization (before any records are written).
    • onTermination

      public void onTermination()
      Description copied from interface: IMonitoringRecordSerializer
      Called by the collector upon termination (after remaining records have been flushed).