public class KryoClassMapRegistrar extends java.lang.Object implements KryoRegistrar
KryoRegistrar
implementation backed by a Map
used to explicitly set the registration ID for each class.Constructor and Description |
---|
KryoClassMapRegistrar(java.util.Map<java.lang.Integer,java.lang.Class<?>> kryoRegisteredClasses) |
Modifier and Type | Method and Description |
---|---|
void |
registerTypes(com.esotericsoftware.kryo.Kryo kryo)
This method is invoked by the
PojoCodec and
applied to the Kryo instance whenever one is provided. |
public KryoClassMapRegistrar(java.util.Map<java.lang.Integer,java.lang.Class<?>> kryoRegisteredClasses)
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 instance