Package kieker.common.record.io
Class BinaryValueSerializer
java.lang.Object
kieker.common.record.io.BinaryValueSerializer
- All Implemented Interfaces:
IValueSerializer
public class BinaryValueSerializer extends java.lang.Object implements IValueSerializer
Default value serializer implementation.
- Since:
- 1.13
- Author:
- Holger Knoche
-
Constructor Summary
Constructors Modifier Constructor Description protected
BinaryValueSerializer(java.nio.ByteBuffer buffer, IWriterRegistry<java.lang.String> stringRegistry)
Create a binary value serializer. -
Method Summary
Modifier and Type Method Description static BinaryValueSerializer
create(java.nio.ByteBuffer buffer, IWriterRegistry<java.lang.String> stringRegistry)
Factory method to create a binary value serializer.void
putBoolean(boolean value)
Stores aboolean
value in the underlying data store.void
putByte(byte value)
Stores abyte
value in the underlying data store.void
putBytes(byte[] value)
Stores raw data in the underlying data store.void
putChar(char value)
Stores achar
value in the underlying data store.void
putDouble(double value)
Stores adouble
value in the underlying data store.<T extends java.lang.Enum<T>>
voidputEnumeration(T value)
Stores aEnumeration
value in the underlying data store.void
putFloat(float value)
Stores afloat
value in the underlying data store.void
putInt(int value)
Stores anint
value in the underlying data store.void
putLong(long value)
Stores along
value in the underlying data store.void
putShort(short value)
Stores ashort
value in the underlying data store.void
putString(java.lang.String value)
Stores aString
value in the underlying data store.
-
Constructor Details
-
BinaryValueSerializer
protected BinaryValueSerializer(java.nio.ByteBuffer buffer, IWriterRegistry<java.lang.String> stringRegistry)Create a binary value serializer.- Parameters:
buffer
- buffer for the serializerstringRegistry
- the string registry used for the serializer
-
-
Method Details
-
create
public static BinaryValueSerializer create(java.nio.ByteBuffer buffer, IWriterRegistry<java.lang.String> stringRegistry)Factory method to create a binary value serializer.- Parameters:
buffer
- serialization bufferstringRegistry
- the string registry used for the serializer- Returns:
- the value serializer
-
putBoolean
public void putBoolean(boolean value)Description copied from interface:IValueSerializer
Stores aboolean
value in the underlying data store.- Specified by:
putBoolean
in interfaceIValueSerializer
- Parameters:
value
- The value to store
-
putByte
public void putByte(byte value)Description copied from interface:IValueSerializer
Stores abyte
value in the underlying data store.- Specified by:
putByte
in interfaceIValueSerializer
- Parameters:
value
- The value to store
-
putInt
public void putInt(int value)Description copied from interface:IValueSerializer
Stores anint
value in the underlying data store.- Specified by:
putInt
in interfaceIValueSerializer
- Parameters:
value
- The value to store
-
putLong
public void putLong(long value)Description copied from interface:IValueSerializer
Stores along
value in the underlying data store.- Specified by:
putLong
in interfaceIValueSerializer
- Parameters:
value
- The value to store
-
putDouble
public void putDouble(double value)Description copied from interface:IValueSerializer
Stores adouble
value in the underlying data store.- Specified by:
putDouble
in interfaceIValueSerializer
- Parameters:
value
- The value to store
-
putBytes
public void putBytes(byte[] value)Description copied from interface:IValueSerializer
Stores raw data in the underlying data store.- Specified by:
putBytes
in interfaceIValueSerializer
- Parameters:
value
- The data to store
-
putString
public void putString(java.lang.String value)Description copied from interface:IValueSerializer
Stores aString
value in the underlying data store.- Specified by:
putString
in interfaceIValueSerializer
- Parameters:
value
- The value to store
-
putChar
public void putChar(char value)Description copied from interface:IValueSerializer
Stores achar
value in the underlying data store.- Specified by:
putChar
in interfaceIValueSerializer
- Parameters:
value
- The value to store
-
putShort
public void putShort(short value)Description copied from interface:IValueSerializer
Stores ashort
value in the underlying data store.- Specified by:
putShort
in interfaceIValueSerializer
- Parameters:
value
- The value to store
-
putFloat
public void putFloat(float value)Description copied from interface:IValueSerializer
Stores afloat
value in the underlying data store.- Specified by:
putFloat
in interfaceIValueSerializer
- Parameters:
value
- The value to store
-
putEnumeration
public <T extends java.lang.Enum<T>> void putEnumeration(T value)Description copied from interface:IValueSerializer
Stores aEnumeration
value in the underlying data store.- Specified by:
putEnumeration
in interfaceIValueSerializer
- Type Parameters:
T
- enumeration type- Parameters:
value
- The value to store
-