Interface SerializerFactory

All Known Implementing Classes:
SerializerFactory.FieldSerializerFactory, SerializerFactory.ReflectionSerializerFactory, SerializerFactory.SingletonSerializerFactory, SerializerFactory.TaggedFieldSerializerFactory

public interface SerializerFactory
A serializer factory that allows the creation of serializers. This factory will be called when a Kryo serializer discovers a new type for which no serializer is yet known. For example, when a factory is registered via Kryo.setDefaultSerializer(SerializerFactory) a different serializer can be created dependent on the type of a class.
  • Method Details

    • newSerializer

      Serializer newSerializer(Kryo kryo, Class<?> type)
      Creates a new serializer
      Parameters:
      kryo - The serializer instance requesting the new serializer.
      type - The type of the object that is to be serialized.
      Returns:
      An implementation of a serializer that is able to serialize an object of type type.