Interface SerializerHook<T>

  • Type Parameters:
    T - the type of the serialized object
    All Known Implementing Classes:

    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 Detail

      • getSerializationType

        java.lang.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
      • isOverwritable

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