Class CacheManagerMetricsRegistration

java.lang.Object
org.infinispan.metrics.impl.CacheManagerMetricsRegistration

public final class CacheManagerMetricsRegistration extends Object
Creates and registers metrics for all components from a cache manager's global component registry.
Since:
10.1.3
Author:
anistor@redhat.com
  • Constructor Details

    • CacheManagerMetricsRegistration

      public CacheManagerMetricsRegistration()
  • Method Details

    • metricsEnabled

      public boolean metricsEnabled()
    • internalRegisterMetrics

      protected Set<Object> internalRegisterMetrics(Object instance, Collection<MBeanMetadata.AttributeMetadata> attributes, String metricPrefix)
    • start

      protected void start()
    • stop

      protected void stop()
    • initNamePrefix

      protected String initNamePrefix()
      Subclasses should override this and return the metric prefix to be used for registration. This is invoked only if metrics are enabled.
    • registerMetrics

      public void registerMetrics(Object instance, String type, String componentName)
      Register metrics for a component that was manually registered later, after component registry startup. The metric ids will be tracked and unregistration will be performed automatically on stop.
    • registerExternalMetrics

      public Set<Object> registerExternalMetrics(Object instance, String prefix)
      Register metrics for a component that was manually registered later, after component registry startup. The metric ids will NOT be tracked and unregistration will NOT be performed automatically on stop.
    • unregisterMetrics

      public void unregisterMetrics(Set<Object> metricIds)