Move JsonSerializable to private API #16032
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JsonSerializable is supposed to be used only when exchanging statistics
with management center. Previously, it was public API because some
statistics classes such as LocalMapStats were exposed as public methods.
Now we move JsonSerializable to private API. Because of this, we have to
cast whenever we want to transform from/to JSON as most internal code
exchanges stats interfaces such as LocalMapStats. The alternative is
that the internal API exchanges concrete classes such as
LocalMapStatsImpl but this is not possible since sometimes there are two
different implementations for the same stats interface.
Addresses #15888 (comment)
EE: https://github.com/hazelcast/hazelcast-enterprise/pull/3358