Class BarbelPojoSerializer<O>
- java.lang.Object
-
- org.projectbarbel.histo.functions.BarbelPojoSerializer<O>
-
- Type Parameters:
O
- the stored type
- All Implemented Interfaces:
com.googlecode.cqengine.persistence.support.serialization.PojoSerializer<O>
public class BarbelPojoSerializer<O> extends Object implements com.googlecode.cqengine.persistence.support.serialization.PojoSerializer<O>
The forwarding serializer always used byBarbelHisto
. If clients decide to useDiskPersistence
orOffHeapPersistence
they need to add thePersistenceConfig
annotation additionally to their business classes.
@PersistenceConfig(serializer=BarbelPojoSerializer.class, polymorphic=true)
- Author:
- Niklas Schlimm
-
-
Constructor Summary
Constructors Constructor Description BarbelPojoSerializer(Class<O> type, com.googlecode.cqengine.persistence.support.serialization.PersistenceConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description O
deserialize(byte[] bytes)
com.googlecode.cqengine.persistence.support.serialization.PersistenceConfig
getConfig()
Class<O>
getType()
byte[]
serialize(O object)
-
-
-
Method Detail
-
serialize
public byte[] serialize(O object)
- Specified by:
serialize
in interfacecom.googlecode.cqengine.persistence.support.serialization.PojoSerializer<O>
-
deserialize
public O deserialize(byte[] bytes)
- Specified by:
deserialize
in interfacecom.googlecode.cqengine.persistence.support.serialization.PojoSerializer<O>
-
getConfig
public com.googlecode.cqengine.persistence.support.serialization.PersistenceConfig getConfig()
-
-