Class 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 by BarbelHisto. If clients decide to use DiskPersistence or OffHeapPersistence they need to add the PersistenceConfig annotation additionally to their business classes.

     @PersistenceConfig(serializer=BarbelPojoSerializer.class, polymorphic=true)
     
    Author:
    Niklas Schlimm
    • Constructor Detail

      • BarbelPojoSerializer

        public BarbelPojoSerializer​(Class<O> type,
                                    com.googlecode.cqengine.persistence.support.serialization.PersistenceConfig config)
    • Method Detail

      • serialize

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

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

        public Class<O> getType()
      • getConfig

        public com.googlecode.cqengine.persistence.support.serialization.PersistenceConfig getConfig()