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 Details

    • MpMetricsRegistryAdapter

      @Inject public MpMetricsRegistryAdapter(@RegistryType(type=VENDOR) org.eclipse.microprofile.metrics.MetricRegistry vendorRegistry, @RegistryType(type=APPLICATION) org.eclipse.microprofile.metrics.MetricRegistry appRegistry)
      Parameters:
      vendorRegistry - the MetricRegistry for vendor metrics
      appRegistry - the MetricRegistry for application metrics
      Throws:
      NullPointerException - if either MetricRegistry parameter is null
  • 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 interface com.tangosol.net.metrics.MetricsRegistryAdapter
      Parameters:
      metric - the MBeanMetric 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 interface com.tangosol.net.metrics.MetricsRegistryAdapter
      Parameters:
      identifier - the MBeanMetric.Identifier of th metric to be removed