Package com.hazelcast.nio.serialization
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 Serializer
s 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 TypeMethodDescriptiondefault Serializer
Creates a new serializer for the serialization typedefault Serializer
createSerializer
(com.hazelcast.internal.serialization.SerializationService serializationService) Creates a new serializer for the serialization typeReturns the actual class type of the serialized objectboolean
Indicates if this serializer can be overridden by defining a custom serializer in the configurations (via code or configuration file)
-
Method Details
-
getSerializationType
Returns the actual class type of the serialized object -
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)
-