public class PojoCodec extends AbstractKryoCodec
Serializers may be registered via
KryoRegistrars.pool| Constructor and Description |
|---|
PojoCodec() |
PojoCodec(KryoRegistrar kryoRegistrar)
Create an instance with a single KryoRegistrar.
|
PojoCodec(KryoRegistrar kryoRegistrar,
boolean useReferences)
Create an instance with a single KryoRegistrar.
|
PojoCodec(java.util.List<KryoRegistrar> kryoRegistrars)
Create an instance with zero to many KryoRegistrars.
|
PojoCodec(java.util.List<KryoRegistrar> kryoRegistrars,
boolean useReferences)
Create an instance with zero to many KryoRegistrars.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureKryoInstance(com.esotericsoftware.kryo.Kryo kryo)
Subclasses implement this to configure the kryo instance.
|
protected <T> T |
doDecode(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
java.lang.Class<T> type)
Subclasses implement this method to decode with Kryo.
|
protected void |
doEncode(com.esotericsoftware.kryo.Kryo kryo,
java.lang.Object object,
com.esotericsoftware.kryo.io.Output output)
Subclasses implement this method to encode with Kryo.
|
decode, decode, encode, encodepublic PojoCodec()
public PojoCodec(KryoRegistrar kryoRegistrar)
kryoRegistrar - the registrar.public PojoCodec(java.util.List<KryoRegistrar> kryoRegistrars)
kryoRegistrars - a list KryoRegistrars.public PojoCodec(KryoRegistrar kryoRegistrar, boolean useReferences)
kryoRegistrar - the registrar.useReferences - set to false if references are not required (if the object graph is known to be acyclical).
The default is 'true' which is less performant but more flexible.public PojoCodec(java.util.List<KryoRegistrar> kryoRegistrars, boolean useReferences)
kryoRegistrars - a list KryoRegistrars.useReferences - set to false if references are not required (if the object graph is known to be acyclical).
The default is 'true' which is less performant but more flexible.protected void doEncode(com.esotericsoftware.kryo.Kryo kryo,
java.lang.Object object,
com.esotericsoftware.kryo.io.Output output)
AbstractKryoCodecdoEncode in class AbstractKryoCodeckryo - the Kryo instanceobject - the object to encodeoutput - the Kryo Output instanceprotected <T> T doDecode(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.io.Input input,
java.lang.Class<T> type)
AbstractKryoCodecdoDecode in class AbstractKryoCodecT - the type for decoded objectkryo - the Kryo instanceinput - the Kryo Input instancetype - the class of the decoded objectprotected void configureKryoInstance(com.esotericsoftware.kryo.Kryo kryo)
AbstractKryoCodecconfigureKryoInstance in class AbstractKryoCodeckryo - the Kryo instance