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 Summary

    Fields 
    Modifier and Type Field Description
    static int CONTAINER_IDENTIFIER
    Container format identifier.
  • Constructor Summary

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

    Modifier and Type Method Description
    protected abstract int getFormatIdentifier()
    Returns the format identifier for the contained data format.
    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.
    protected abstract int writeRecords​(java.util.Collection<IMonitoringRecord> records, java.nio.ByteBuffer buffer)
    Write the given records to the given byte buffer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface kieker.monitoring.writer.serializer.IMonitoringRecordSerializer

    onInitialization, onTermination
  • Field Details

  • Constructor Details

  • Method Details

    • serializeRecord

      public final 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 final 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
    • writeRecords

      protected abstract int writeRecords​(java.util.Collection<IMonitoringRecord> records, java.nio.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