public interface MetricRegistry
| Modifier and Type | Method and Description |
|---|---|
void |
readLock()
Acquires a non-exclusive read lock that will cause calls from other threads
to
registerMetric(Metric, MetricMetadata) or unregister(MetricID)
to block. |
void |
registerMetric(Metric metric,
MetricMetadata metadata)
Registers the given metric.
|
void |
unlock()
Releases the non-exclusive lock obtained by a call to
readLock(). |
void |
unregister(MetricID metricID)
Unregisters the given metric, if it is registered.
|
void registerMetric(Metric metric, MetricMetadata metadata)
holds the registry read lock.metric - the metric. Cannot be nullmetadata - metadata for the metric. Cannot be nullvoid unregister(MetricID metricID)
holds the registry read lock.metricID - the id for the metric. Cannot be nullvoid readLock()
registerMetric(Metric, MetricMetadata) or unregister(MetricID)
to block. Must be followed by a call to unlock().void unlock()
readLock().Copyright © 2022 JBoss by Red Hat. All rights reserved.