Class BinarySerializer
java.lang.Object
kieker.monitoring.writer.serializer.AbstractMonitoringRecordSerializer
kieker.monitoring.writer.serializer.AbstractContainerFormatSerializer
kieker.monitoring.writer.serializer.BinarySerializer
- All Implemented Interfaces:
IMonitoringRecordSerializer
public class BinarySerializer extends AbstractContainerFormatSerializer
Serializer for the default Kieker binary record format.
- Since:
- 1.13
- Author:
- Holger Knoche
-
Field Summary
Fields Modifier and Type Field Description static int
FORMAT_IDENTIFIER
Format identifier.Fields inherited from class kieker.monitoring.writer.serializer.AbstractContainerFormatSerializer
CONTAINER_IDENTIFIER
-
Constructor Summary
Constructors Constructor Description BinarySerializer(Configuration configuration)
Creates a new serializer using the given configuration. -
Method Summary
Modifier and Type Method Description protected int
getFormatIdentifier()
Returns the format identifier for the contained data format.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).protected int
writeRecords(java.util.Collection<IMonitoringRecord> records, java.nio.ByteBuffer buffer)
Write the given records to the given byte buffer.Methods inherited from class kieker.monitoring.writer.serializer.AbstractContainerFormatSerializer
serializeRecord, serializeRecords
-
Field Details
-
FORMAT_IDENTIFIER
public static final int FORMAT_IDENTIFIERFormat identifier.
-
-
Constructor Details
-
BinarySerializer
Creates a new serializer using the given configuration.- Parameters:
configuration
- The configuration to use
-
-
Method Details
-
getFormatIdentifier
protected int getFormatIdentifier()Description copied from class:AbstractContainerFormatSerializer
Returns the format identifier for the contained data format.- Specified by:
getFormatIdentifier
in classAbstractContainerFormatSerializer
- Returns:
- see above
-
writeRecords
protected int writeRecords(java.util.Collection<IMonitoringRecord> records, java.nio.ByteBuffer buffer)Description copied from class:AbstractContainerFormatSerializer
Write the given records to the given byte buffer.- Specified by:
writeRecords
in classAbstractContainerFormatSerializer
- Parameters:
records
- The records to writebuffer
- The buffer to write to- Returns:
- The size of the written data in bytes
-
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).
-