Skip to content
New issue

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

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

Already on GitHub? # to your account

Rationalize some metrics 1.1 and 2.0 support code; add sync to both impls #1071

Merged
merged 2 commits into from
Sep 30, 2019
Merged

Rationalize some metrics 1.1 and 2.0 support code; add sync to both impls #1071

merged 2 commits into from
Sep 30, 2019

Conversation

tjquinno
Copy link
Member

These changes bring the 1.1 and 2.0 metrics support code more closely in alignment, particularly the registry implementations. They also remove from metrics2/metrics2 the flexible setting (and related code) added earlier to HelidonMetadata.

The resulting Registry code is clearer (I hope):

  • The methods getOrRegisterMetric and getOrRegisterMetadata, as their names suggest, retrieve an existing and compatible instance if available and create one otherwise. Those methods are also refactored and simplified a bit.
  • The methods 'registerMetric and 'registerMetadata do just that, without checking for pre-existing instances.

These changes also add thread-safeness to the 1.1 and 2.0 registries.

…ng MetricProducer and Registry more in line with the metrics/metrics counterparts; add synchronization to metrics 1.1 and 2.0 support
@tjquinno tjquinno merged commit 88b44f0 into helidon-io:master Sep 30, 2019
@tjquinno tjquinno deleted the cleanup-flexible-metadata branch September 30, 2019 14:06
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants