Interface SerializerHook<T>

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

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). It needs to be registered using a file called "com.hazelcast.SerializerHook" in META-INF/services. Those services files are not registered using the standard Java6+ java.util.ServiceLoader but with a Hazelcast version that is capable of working with multiple classloaders to support JEE and OSGi environments.
  • Method Summary

    Modifier and Type Method Description
    Serializer createSerializer()
    Creates a new serializer for the serialization type
    Class<T> getSerializationType()
    Returns the actual class type of the serialized object
    boolean isOverwritable()
    Defines if this serializer can be overridden by defining a custom serializer in the configurations (codebase or configuration file)
  • Method Details

    • getSerializationType

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

      Serializer createSerializer()
      Creates a new serializer for the serialization type
      Returns:
      a new serializer instance
    • isOverwritable

      boolean isOverwritable()
      Defines if this serializer can be overridden by defining a custom serializer in the configurations (codebase or configuration file)
      Returns:
      if the serializer is overwritable