hazelcast / hazelcast/hazelcast-cpp-client
[TRACKING ISSUE] [API-1250] Move type name and class to the `CompactSerializer`
- Dominant language
- C++
- Stars
- 91
- Forks
- 54
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 5
Description
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
```xml
com.example.FooSerializer
com.example.Foo
```
```yaml
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.
Contributor guide
Assessment
This issue has not been assessed yet.