Interface KryoRegistrar
- All Known Implementing Classes:
AbstractKryoRegistrar
,CompositeKryoRegistrar
,FileKryoRegistrar
,KryoClassListRegistrar
,KryoClassMapRegistrar
,KryoRegistrationRegistrar
,MessageKryoRegistrar
public interface KryoRegistrar
Strategy interface used by
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.- Since:
- 4.2
- Author:
- David Turanski
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<com.esotericsoftware.kryo.Registration>
void
registerTypes
(com.esotericsoftware.kryo.Kryo kryo) This method is invoked by thePojoCodec
and applied to theKryo
instance whenever a new instance is created.
-
Field Details
-
MIN_REGISTRATION_VALUE
static final int MIN_REGISTRATION_VALUE- See Also:
-
-
Method Details
-
registerTypes
void registerTypes(com.esotericsoftware.kryo.Kryo kryo) This method is invoked by thePojoCodec
and applied to theKryo
instance whenever a new instance is created.- Parameters:
kryo
- the Kryo instance
-
getRegistrations
List<com.esotericsoftware.kryo.Registration> getRegistrations()- Returns:
- the list of
Registration
provided
-