public interface KryoRegistrar
PojoCodec
to configure registrations
classes consistently across Kryo
instances.
By default, user defined types are not registered to Kryo.
Registration allows a unique ID (small positive integer is ideal) to represent the type
in the byte stream. In a distributed environment, all Kryo instances must maintain a
consistent registration configuration in order for serialization to function properly.
Registrations can result in better performance in demanding situations,
but requires some care to maintain. Use this feature only if you really need it.Modifier and Type | Field and Description |
---|---|
static int |
MIN_REGISTRATION_VALUE |
Modifier and Type | Method and Description |
---|---|
List<com.esotericsoftware.kryo.Registration> |
getRegistrations() |
void |
registerTypes(com.esotericsoftware.kryo.Kryo kryo)
This method is invoked by the
PojoCodec and
applied to the Kryo instance whenever a new instance is created. |
static final int MIN_REGISTRATION_VALUE
void registerTypes(com.esotericsoftware.kryo.Kryo kryo)
PojoCodec
and
applied to the Kryo
instance whenever a new instance is created.kryo
- the Kryo instanceList<com.esotericsoftware.kryo.Registration> getRegistrations()
Registration
provided