public abstract class AbstractKryoRegistrar extends java.lang.Object implements KryoRegistrar
Modifier and Type | Field and Description |
---|---|
protected static com.esotericsoftware.kryo.Kryo |
kryo |
protected org.slf4j.Logger |
log |
MIN_REGISTRATION_VALUE
Constructor and Description |
---|
AbstractKryoRegistrar() |
Modifier and Type | Method and Description |
---|---|
abstract java.util.List<com.esotericsoftware.kryo.Registration> |
getRegistrations() |
protected void |
register(com.esotericsoftware.kryo.Kryo kryo,
com.esotericsoftware.kryo.Registration registration) |
void |
registerTypes(com.esotericsoftware.kryo.Kryo kryo)
This method is invoked by the
PojoCodec and
applied to the Kryo instance whenever one is provided. |
protected final org.slf4j.Logger log
protected static final com.esotericsoftware.kryo.Kryo kryo
public void registerTypes(com.esotericsoftware.kryo.Kryo kryo)
KryoRegistrar
PojoCodec
and
applied to the Kryo
instance whenever one is provided. This is currently done using an object pool so it
is inevitable that this method will be invoked repeatedly on the same instance. Kryo registration is idempotent,
but this could become inefficient if registering a large amount of types.registerTypes
in interface KryoRegistrar
kryo
- the provided instancepublic abstract java.util.List<com.esotericsoftware.kryo.Registration> getRegistrations()
getRegistrations
in interface KryoRegistrar
Registration
providedprotected void register(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.Registration registration)