Package org.infinispan.metrics.impl
Class CacheMetricsRegistration
- java.lang.Object
-
- org.infinispan.metrics.impl.CacheMetricsRegistration
-
public final class CacheMetricsRegistration extends Object
Creates and registers metrics for all components from a cache's component registry.- Since:
- 10.1.3
- Author:
- anistor@redhat.com
-
-
Constructor Summary
Constructors Constructor Description CacheMetricsRegistration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringinitNamePrefix()Subclasses should override this and return the metric prefix to be used for registration.protected Set<org.eclipse.microprofile.metrics.MetricID>internalRegisterMetrics(Object instance, MBeanMetadata beanMetadata, String metricPrefix)booleanmetricsEnabled()Set<org.eclipse.microprofile.metrics.MetricID>registerExternalMetrics(Object instance, String prefix)Register metrics for a component that was manually registered later, after component registry startup.voidregisterMetrics(Object instance, String type, String componentName)Register metrics for a component that was manually registered later, after component registry startup.protected voidstart()protected voidstop()voidunregisterMetrics(Set<org.eclipse.microprofile.metrics.MetricID> metricIds)
-
-
-
Method Detail
-
metricsEnabled
public boolean metricsEnabled()
-
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.
-
internalRegisterMetrics
protected Set<org.eclipse.microprofile.metrics.MetricID> internalRegisterMetrics(Object instance, MBeanMetadata beanMetadata, String metricPrefix)
-
start
protected void start()
-
stop
protected void stop()
-
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<org.eclipse.microprofile.metrics.MetricID> 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<org.eclipse.microprofile.metrics.MetricID> metricIds)
-
-