Interface SerializerHook<T>

Type Parameters:
T - the type of the serialized object

public interface SerializerHook<T>
This interface is used to automatically register serializers from external Hazelcast or user modules.

Both types of Serializers are supported: StreamSerializer and ByteArraySerializer. The serializers need to be registered using a file named "com.hazelcast.SerializerHook" in META-INF/services. Those services files are not registered using the standard Java 6+ ServiceLoader, but with a Hazelcast version that is capable of working with multiple class loaders to support JEE and OSGi environments.

  • Method Summary

    Modifier and Type
    Method
    Description
    default Serializer
    Creates a new serializer for the serialization type
    default Serializer
    createSerializer(com.hazelcast.internal.serialization.SerializationService serializationService)
    Creates a new serializer for the serialization type
    Returns the actual class type of the serialized object
    boolean
    Indicates if this serializer can be overridden by defining a custom serializer in the configurations (via code or configuration file)
  • Method Details

    • getSerializationType

      Class<T> getSerializationType()
      Returns the actual class type of the serialized object
    • createSerializer

      default Serializer createSerializer()
      Creates a new serializer for the serialization type
    • createSerializer

      default Serializer createSerializer(com.hazelcast.internal.serialization.SerializationService serializationService)
      Creates a new serializer for the serialization type
      Since:
      5.4
    • isOverwritable

      boolean isOverwritable()
      Indicates if this serializer can be overridden by defining a custom serializer in the configurations (via code or configuration file)