hazelcast-python-client icon indicating copy to clipboard operation
hazelcast-python-client copied to clipboard

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

Open hz-devops-test opened this issue 2 years ago • 0 comments

The tracking issue for the Java side PR.

See https://github.com/hazelcast/hazelcast/pull/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.

hz-devops-test avatar Jul 27 '22 12:07 hz-devops-test