Class JCacheMetricsBinder
java.lang.Object
io.micronaut.cache.jcache.metrics.JCacheMetricsBinder
- All Implemented Interfaces:
io.micronaut.context.event.BeanCreatedEventListener<javax.cache.CacheManager>
,EventListener
@Singleton
@RequiresMetrics
@Requires(beans=javax.cache.CacheManager.class) @Requires(property="micronaut.metrics.binders.cache.enabled",notEquals="false")
public class JCacheMetricsBinder
extends Object
implements io.micronaut.context.event.BeanCreatedEventListener<javax.cache.CacheManager>
Instruments the active JCache manager.
- Since:
- 1.1.0
- Author:
- graemerocher
-
Constructor Summary
ModifierConstructorDescriptionprotected
JCacheMetricsBinder
(io.micronaut.context.BeanProvider<io.micrometer.core.instrument.MeterRegistry> meterRegistryProvider) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionjavax.cache.CacheManager
onCreated
(io.micronaut.context.event.BeanCreatedEvent<javax.cache.CacheManager> event)
-
Constructor Details
-
JCacheMetricsBinder
protected JCacheMetricsBinder(io.micronaut.context.BeanProvider<io.micrometer.core.instrument.MeterRegistry> meterRegistryProvider) Default constructor.- Parameters:
meterRegistryProvider
- The meter registry.
-
-
Method Details
-
onCreated
public javax.cache.CacheManager onCreated(io.micronaut.context.event.BeanCreatedEvent<javax.cache.CacheManager> event) - Specified by:
onCreated
in interfaceio.micronaut.context.event.BeanCreatedEventListener<javax.cache.CacheManager>
-