You need to return the class constructor from this function. For example, if a class is
instantiated with new Employee()
class constructor is Employee
. Alternatively, you can
return a constructor function from this class. The function you provided will be used to check
if an object is compact serializable.
The class or the constructor function which the serializer is written for.
Type name is written into the serialized data and used while deserialization. This should have the same value with what other members of the cluster have. While deserializing there should be a matching serializer otherwise a GenericRecord will be returned.
The type name of the registered class.
This method should construct a class instance and return it.
reader to read fields of an object
the class instance created as a result of read method.
This method should write a class instance's fields into writer.
CompactWriter to serialize the fields onto
class instance to be serialized.
Generated using TypeDoc
Defines the contract of the serializers used for Compact serialization.
After defining a serializer for the objects of the class
C
, it can be registered using the {@link ClientConfig.serialization.compact.serializers}.write and read methods must be consistent with each other.
This API is currently in Beta and can change at any time.