Class 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 use DiskPersistence and OffHeapPersistence on their backbone collection. Uses the original cqengine KryoSerializer but handles the case when proxies are passed for persistence. Proxies will always be persisted as BitemporalVersion instead of the dynamic class created by CGLib or any other. Notice that proxies need to implement BarbelProxy and Bitemporal so that they can be managed here.
    Author:
    Niklas Schlimm
    • Constructor Detail

    • Method Detail

      • serialize

        public byte[] serialize​(Bitemporal object)
        Specified by:
        serialize in interface com.googlecode.cqengine.persistence.support.serialization.PojoSerializer<Bitemporal>
      • deserialize

        public Bitemporal deserialize​(byte[] bytes)
        Specified by:
        deserialize in interface com.googlecode.cqengine.persistence.support.serialization.PojoSerializer<Bitemporal>
      • validateObjectIsRoundTripSerializable

        public static <O> boolean validateObjectIsRoundTripSerializable​(BarbelHistoContext context,
                                                                        O candidatePojo)