Class AbstractContainerFormatSerializer

java.lang.Object
kieker.monitoring.writer.serializer.AbstractMonitoringRecordSerializer
kieker.monitoring.writer.serializer.AbstractContainerFormatSerializer
All Implemented Interfaces:
IMonitoringRecordSerializer
Direct Known Subclasses:
BinarySerializer

public abstract class AbstractContainerFormatSerializer extends AbstractMonitoringRecordSerializer
Abstract serializer for the Kieker container format for monitoring records. This container format provides a flexible mechanism to embed data in different formats.
Since:
1.13
Author:
Holger Knoche
  • Field Details

    • CONTAINER_IDENTIFIER

      public static final int CONTAINER_IDENTIFIER
      Container format identifier.
  • Constructor Details

    • AbstractContainerFormatSerializer

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

    • serializeRecord

      public final int serializeRecord(IMonitoringRecord record, 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 final int serializeRecords(Collection<IMonitoringRecord> records, 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
    • writeRecords

      protected abstract int writeRecords(Collection<IMonitoringRecord> records, ByteBuffer buffer)
      Write the given records to the given byte buffer.
      Parameters:
      records - The records to write
      buffer - The buffer to write to
      Returns:
      The size of the written data in bytes
    • getFormatIdentifier

      protected abstract int getFormatIdentifier()
      Returns the format identifier for the contained data format.
      Returns:
      see above