Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move JsonSerializable to private API #16032

Merged
merged 2 commits into from
Nov 18, 2019

Conversation

mmedenjak
Copy link
Contributor

@mmedenjak mmedenjak commented Nov 15, 2019

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

Copy link
Contributor

@emre-aydin emre-aydin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a minor comment. LGTM.

Matko Medenjak added 2 commits November 18, 2019 10:35
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 hazelcast#15888 (comment)
@mmedenjak mmedenjak merged commit 4b6ee47 into hazelcast:master Nov 18, 2019
@mmedenjak mmedenjak deleted the 4.0-json-serializable branch November 18, 2019 12:12
petrpleshachkov pushed a commit to petrpleshachkov/hazelcast that referenced this pull request Nov 22, 2019
Move JsonSerializable to private API

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 hazelcast#15888 (comment)
@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants