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 of
MetricsRegistryAdapter
registers Coherence
metrics with Helidon's vendor or application registry.
This implementation is NOT discoverable by the standard ServiceLoader
mechanism, as it requires CDI injection of vendor and application metrics
registries. CdiMetricsRegistryAdapter
bridges the gap between the
ServiceLoader
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
ConstructorDescriptionMpMetricsRegistryAdapter
(org.eclipse.microprofile.metrics.MetricRegistry vendorRegistry, org.eclipse.microprofile.metrics.MetricRegistry appRegistry) Construct aMpMetricsRegistryAdapter
. -
Method Summary
-
Constructor Details
-
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 Details
-
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
-