Class KryoBinding<K>

java.lang.Object
org.archive.bdb.KryoBinding<K>
All Implemented Interfaces:
com.sleepycat.bind.EntryBinding<K>

public class KryoBinding<K>
extends Object
implements com.sleepycat.bind.EntryBinding<K>
Binding for use with BerkeleyDB-JE that uses Kryo serialization rather than BDB's (custom version of) Java serialization.
Author:
gojomo
  • Field Details

  • Constructor Details

    • KryoBinding

      public KryoBinding​(Class<K> baseClass)
      Constructor. Save parameters locally, as superclass fields are private.
      Parameters:
      baseClass - is the base class for serialized objects stored using this binding
  • Method Details

    • getKryo

      public com.esotericsoftware.kryo.Kryo getKryo()
    • objectToEntry

      public void objectToEntry​(K object, com.sleepycat.je.DatabaseEntry entry)
      Copies superclass simply to allow different source for FastOoutputStream.
      Specified by:
      objectToEntry in interface com.sleepycat.bind.EntryBinding<K>
      See Also:
      SerialBinding.entryToObject(com.sleepycat.je.DatabaseEntry)
    • entryToObject

      public K entryToObject​(com.sleepycat.je.DatabaseEntry entry)
      Specified by:
      entryToObject in interface com.sleepycat.bind.EntryBinding<K>