Class AdaptingKryoSerializer
- java.lang.Object
-
- org.projectbarbel.histo.functions.AdaptingKryoSerializer
-
- All Implemented Interfaces:
com.googlecode.cqengine.persistence.support.serialization.PojoSerializer<Bitemporal>
public class AdaptingKryoSerializer extends Object implements com.googlecode.cqengine.persistence.support.serialization.PojoSerializer<Bitemporal>
Serializer that is used in case clients decide to useDiskPersistence
andOffHeapPersistence
on their backbone collection. Uses the original cqengineKryoSerializer
but handles the case when proxies are passed for persistence. Proxies will always be persisted asBitemporalVersion
instead of the dynamic class created by CGLib or any other. Notice that proxies need to implementBarbelProxy
andBitemporal
so that they can be managed here.- Author:
- Niklas Schlimm
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
static String
PERSISTENCE_CONFIG
-
Constructor Summary
Constructors Constructor Description AdaptingKryoSerializer(BarbelHistoContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Bitemporal
deserialize(byte[] bytes)
byte[]
serialize(Bitemporal object)
static <O> boolean
validateObjectIsRoundTripSerializable(BarbelHistoContext context, O candidatePojo)
-
-
-
Field Detail
-
OBJECT_TYPE
public static final String OBJECT_TYPE
- See Also:
- Constant Field Values
-
PERSISTENCE_CONFIG
public static final String PERSISTENCE_CONFIG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AdaptingKryoSerializer
public AdaptingKryoSerializer(BarbelHistoContext context)
-
-
Method Detail
-
serialize
public byte[] serialize(Bitemporal object)
- Specified by:
serialize
in interfacecom.googlecode.cqengine.persistence.support.serialization.PojoSerializer<Bitemporal>
-
deserialize
public Bitemporal deserialize(byte[] bytes)
- Specified by:
deserialize
in interfacecom.googlecode.cqengine.persistence.support.serialization.PojoSerializer<Bitemporal>
-
validateObjectIsRoundTripSerializable
public static <O> boolean validateObjectIsRoundTripSerializable(BarbelHistoContext context, O candidatePojo)
-
-