Class FurySerializer<T>
- java.lang.Object
-
- io.github.oberhoff.distributedcaffeine.serializer.FurySerializer<T>
-
- Type Parameters:
T
- the type of the object to serialize
- All Implemented Interfaces:
ByteArraySerializer<T>
,Serializer<T,byte[]>
public class FurySerializer<T> extends Object implements ByteArraySerializer<T>
Implementation of a serializer with byte array representation based on Apache Fury.- Author:
- Andreas Oberhoff
- See Also:
- Apache Fury on GitHub
-
-
Constructor Summary
Constructors Constructor Description FurySerializer(Class<?>... registerClasses)
Constructs a serializer with byte array representation based on Apache Fury along with optionalClass
-based type information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
deserialize(byte[] value)
Deserializes a value.byte[]
serialize(Object object)
Serializes an object.
-
-
-
Constructor Detail
-
FurySerializer
public FurySerializer(Class<?>... registerClasses)
Constructs a serializer with byte array representation based on Apache Fury along with optionalClass
-based type information.- Parameters:
registerClasses
- optionalClass
of the object (with additional classes of nested objects) to serialize
-
-
Method Detail
-
serialize
public byte[] serialize(Object object) throws SerializerException
Description copied from interface:Serializer
Serializes an object.- Specified by:
serialize
in interfaceByteArraySerializer<T>
- Specified by:
serialize
in interfaceSerializer<T,byte[]>
- Parameters:
object
- the object to be serialized- Returns:
- the serialized value
- Throws:
SerializerException
- if serialization fails
-
deserialize
public T deserialize(byte[] value) throws SerializerException
Description copied from interface:Serializer
Deserializes a value.- Specified by:
deserialize
in interfaceByteArraySerializer<T>
- Specified by:
deserialize
in interfaceSerializer<T,byte[]>
- Parameters:
value
- the value to be deserialized- Returns:
- the deserialized object
- Throws:
SerializerException
- if deserialization fails
-
-