Package com.hazelcast.nio.serialization
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
Serializer
s are supported:StreamSerializer
andByteArraySerializer
. 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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Serializer
createSerializer()
Creates a new serializer for the serialization typedefault Serializer
createSerializer(com.hazelcast.internal.serialization.SerializationService serializationService)
Creates a new serializer for the serialization typejava.lang.Class<T>
getSerializationType()
Returns the actual class type of the serialized objectboolean
isOverwritable()
Indicates if this serializer can be overridden by defining a custom serializer in the configurations (via code or configuration file)
-
-
-
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- 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)
-
-