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

    Fields 
    Modifier and Type Field Description
    static int MIN_REGISTRATION_VALUE  
  • Method Summary

    Modifier and Type Method 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.
  • Field Details

  • Method Details

    • registerTypes

      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.
      Parameters:
      kryo - the Kryo instance
    • getRegistrations

      List<com.esotericsoftware.kryo.Registration> getRegistrations()
      Returns:
      the list of Registration provided