hazelcast/hazelcast-python-client

[TRACKING ISSUE] [API-1250] Move type name and class to the `CompactSerializer`

hz-devops-test opened this issue · 1 comments

The tracking issue for the Java side PR.

See hazelcast/hazelcast#21861 for details.


This PR updates the CompactSerializer interface, by moving
the type name and class definitions to there.

The newly added method names to the CompactSerializer API
are getTypeName and getClazz (because getClass is a method
defined in the Object class).

Due to that, the APIs in the CompactSerializationConfig are
also changed.

We have decided to use the addSerializer API to register
serializers, and addClass API to register classes to be serialized
with Compact serialization, overriding other serialization mechanisms.

Also, the declarative configuration is also updated to reflect
these changes, it now looks like

<compact-serialization enabled="true">
	<serializers>
		<serializer>com.example.FooSerializer</serializer>
	</serializers>
	<classes>
		<class>com.example.Foo</class>
	</classes>
</compact-serialization>
compact-serialization:
  enabled: true
  serializers:
    - serializer: "com.example.FooSerializer"
  classes:
    - class: "com.example.Foo"

The motivation is to make the API consistent across all clients.

Closing this, as we have already moved the type name and class to serilizer