Package com.oracle.coherence.mp.metrics
Class MpMetricsRegistryAdapter
- java.lang.Object
-
- com.oracle.coherence.mp.metrics.MpMetricsRegistryAdapter
-
- All Implemented Interfaces:
com.tangosol.net.metrics.MetricsRegistryAdapter
@ApplicationScoped public class MpMetricsRegistryAdapter extends Object implements com.tangosol.net.metrics.MetricsRegistryAdapter
An implementation ofMetricsRegistryAdapter
registers Coherence metrics with Helidon's vendor or application registry. This implementation is NOT discoverable by the standardServiceLoader
mechanism, as it requires CDI injection of vendor and application metrics registries.CdiMetricsRegistryAdapter
bridges the gap between theServiceLoader
and the CDI, and will discover this adapter and register metrics with it.- Since:
- 20.06
- Author:
- Aleks Seovic 2019.09.13, Jonathan Knight 2020.01.08
-
-
Constructor Summary
Constructors Constructor Description MpMetricsRegistryAdapter(org.eclipse.microprofile.metrics.MetricRegistry vendorRegistry, org.eclipse.microprofile.metrics.MetricRegistry appRegistry)
Construct aMpMetricsRegistryAdapter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
register(com.tangosol.net.metrics.MBeanMetric metric)
Register a metric.void
remove(com.tangosol.net.metrics.MBeanMetric.Identifier identifier)
Remove a metric.
-
-
-
Constructor Detail
-
MpMetricsRegistryAdapter
@Inject public MpMetricsRegistryAdapter(@RegistryType(type=VENDOR) org.eclipse.microprofile.metrics.MetricRegistry vendorRegistry, @RegistryType(type=APPLICATION) org.eclipse.microprofile.metrics.MetricRegistry appRegistry)
Construct aMpMetricsRegistryAdapter
.- Parameters:
vendorRegistry
- theMetricRegistry
for vendor metricsappRegistry
- theMetricRegistry
for application metrics- Throws:
NullPointerException
- if eitherMetricRegistry
parameter isnull
-
-
Method Detail
-
register
public void register(com.tangosol.net.metrics.MBeanMetric metric)
Description copied from interface:com.tangosol.net.metrics.MetricsRegistryAdapter
Register a metric.- Specified by:
register
in interfacecom.tangosol.net.metrics.MetricsRegistryAdapter
- Parameters:
metric
- theMBeanMetric
to register
-
remove
public void remove(com.tangosol.net.metrics.MBeanMetric.Identifier identifier)
Description copied from interface:com.tangosol.net.metrics.MetricsRegistryAdapter
Remove a metric.- Specified by:
remove
in interfacecom.tangosol.net.metrics.MetricsRegistryAdapter
- Parameters:
identifier
- theMBeanMetric.Identifier
of th metric to be removed
-
-