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 intFORMAT_IDENTIFIERFormat 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 intgetFormatIdentifier()Returns the format identifier for the contained data format.voidonInitialization()Called by the collector during initialization (before any records are written).voidonTermination()Called by the collector upon termination (after remaining records have been flushed).protected intwriteRecords(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:AbstractContainerFormatSerializerReturns the format identifier for the contained data format.- Specified by:
getFormatIdentifierin classAbstractContainerFormatSerializer- Returns:
- see above
-
writeRecords
protected int writeRecords(java.util.Collection<IMonitoringRecord> records, java.nio.ByteBuffer buffer)Description copied from class:AbstractContainerFormatSerializerWrite the given records to the given byte buffer.- Specified by:
writeRecordsin 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:IMonitoringRecordSerializerCalled by the collector during initialization (before any records are written). -
onTermination
public void onTermination()Description copied from interface:IMonitoringRecordSerializerCalled by the collector upon termination (after remaining records have been flushed).
-