T - Type of the serialized/deserialized classpublic interface CompactSerializer<T>
 After defining a serializer for the objects of the class T, it can be
 registered using the
 CompactSerializationConfig.
 
 write(CompactWriter, Object) and read(CompactReader)
 methods must be consistent with each other.
| Modifier and Type | Method and Description | 
|---|---|
Class<T> | 
getCompactClass()  | 
String | 
getTypeName()
Returns the unique type name for the class  
T. | 
T | 
read(CompactReader reader)  | 
void | 
write(CompactWriter writer,
     T object)  | 
@Nonnull T read(@Nonnull CompactReader reader)
reader - reader to read fields of an objectHazelcastSerializationException - in case of failure to readvoid write(@Nonnull CompactWriter writer, @Nonnull T object)
writer - CompactWriter to serialize the fields ontoobject - to be serialized.HazelcastSerializationException - in case of failure to write@Nonnull String getTypeName()
T.
 
 If the class T is ever evolved by adding or removing fields, the
 type name for the evolved serializers must be the same with the initial
 version.
Copyright © 2023 Hazelcast, Inc.. All rights reserved.