Skip to content

KryoSerializerInstance

KryoSerializerInstance is a SerializerInstance.

Creating Instance

KryoSerializerInstance takes the following to be created:

KryoSerializerInstance is created when:

Output

KryoSerializerInstance creates Kryo's Output lazily (on demand and once only).

KryoSerializerInstance requests the KryoSerializer for a newKryoOutput.

output is used for serialization.

serialize

serialize[T: ClassTag](
  t: T): ByteBuffer

serialize is part of the SerializerInstance abstraction.

serialize...FIXME

deserialize

deserialize[T: ClassTag](
  bytes: ByteBuffer): T

deserialize is part of the SerializerInstance abstraction.

deserialize...FIXME

Releasing Kryo Instance

releaseKryo(
  kryo: Kryo): Unit

releaseKryo...FIXME

releaseKryo is used when:

  • KryoSerializationStream is requested to close
  • KryoDeserializationStream is requested to close
  • KryoSerializerInstance is requested to serialize and deserialize (and getAutoReset)

getAutoReset

getAutoReset(): Boolean

getAutoReset uses Java Reflection to access the value of the autoReset field of the Kryo class.

getAutoReset is used when: