@NonNullApi
 @NonNullFields
public class MicronautCaffeineCacheMetrics
extends io.micrometer.core.instrument.binder.cache.CacheMeterBinder
Note that `recordStats()` is required to gather non-zero statistics:
 Cache<String, String> cache = Caffeine.newBuilder().recordStats().build();
 CaffeineCacheMetrics.monitor(registry, cache, "mycache", "region", "test");
 
 NOTE: This is a fork of https://github.com/micrometer-metrics/micrometer/blob/master/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/CaffeineCacheMetrics.java The reason for the fork is because Micronaut repackages caffeine under a different package
| Constructor and Description | 
|---|
MicronautCaffeineCacheMetrics(com.github.benmanes.caffeine.cache.Cache<?,?> cache,
                             String cacheName,
                             Iterable<io.micrometer.core.instrument.Tag> tags)
Creates a new  
MicronautCaffeineCacheMetrics instance. | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
bindImplementationSpecificMetrics(io.micrometer.core.instrument.MeterRegistry registry)  | 
protected Long | 
evictionCount()  | 
protected long | 
hitCount()  | 
protected Long | 
missCount()  | 
static <C extends com.github.benmanes.caffeine.cache.AsyncLoadingCache> | 
monitor(io.micrometer.core.instrument.MeterRegistry registry,
       C cache,
       String cacheName,
       Iterable<io.micrometer.core.instrument.Tag> tags)
Record metrics on a Caffeine cache. 
 | 
static <C extends com.github.benmanes.caffeine.cache.Cache> | 
monitor(io.micrometer.core.instrument.MeterRegistry registry,
       C cache,
       String cacheName,
       Iterable<io.micrometer.core.instrument.Tag> tags)
Record metrics on a Caffeine cache. 
 | 
static <C extends com.github.benmanes.caffeine.cache.AsyncLoadingCache> | 
monitor(io.micrometer.core.instrument.MeterRegistry registry,
       C cache,
       String cacheName,
       String... tags)
Record metrics on a Caffeine cache. 
 | 
static <C extends com.github.benmanes.caffeine.cache.Cache> | 
monitor(io.micrometer.core.instrument.MeterRegistry registry,
       C cache,
       String cacheName,
       String... tags)
Record metrics on a Caffeine cache. 
 | 
protected long | 
putCount()  | 
protected Long | 
size()  | 
public MicronautCaffeineCacheMetrics(com.github.benmanes.caffeine.cache.Cache<?,?> cache,
                                     String cacheName,
                                     Iterable<io.micrometer.core.instrument.Tag> tags)
MicronautCaffeineCacheMetrics instance.cache - The cache to be instrumented. You must call Caffeine.recordStats() prior to building the cache
                  for metrics to be recorded.cacheName - Will be used to tag metrics with "cache".tags - tags to apply to all recorded metrics.public static <C extends com.github.benmanes.caffeine.cache.Cache> C monitor(io.micrometer.core.instrument.MeterRegistry registry,
                                                                             C cache,
                                                                             String cacheName,
                                                                             String... tags)
Caffeine.recordStats() prior to building the cache
 for metrics to be recorded.C - The cache type.registry - The registry to bind metrics to.cache - The cache to instrument.cacheName - Will be used to tag metrics with "cache".tags - Tags to apply to all recorded metrics. Must be an even number of arguments representing key/value pairs of tags.public static <C extends com.github.benmanes.caffeine.cache.Cache> C monitor(io.micrometer.core.instrument.MeterRegistry registry,
                                                                             C cache,
                                                                             String cacheName,
                                                                             Iterable<io.micrometer.core.instrument.Tag> tags)
Caffeine.recordStats() prior to building the cache
 for metrics to be recorded.C - The cache type.registry - The registry to bind metrics to.cache - The cache to instrument.cacheName - Will be used to tag metrics with "cache".tags - Tags to apply to all recorded metrics.CacheStatspublic static <C extends com.github.benmanes.caffeine.cache.AsyncLoadingCache> C monitor(io.micrometer.core.instrument.MeterRegistry registry,
                                                                                         C cache,
                                                                                         String cacheName,
                                                                                         String... tags)
Caffeine.recordStats() prior to building the cache
 for metrics to be recorded.C - The cache type.registry - The registry to bind metrics to.cache - The cache to instrument.cacheName - Will be used to tag metrics with "cache".tags - Tags to apply to all recorded metrics. Must be an even number of arguments representing key/value pairs of tags.public static <C extends com.github.benmanes.caffeine.cache.AsyncLoadingCache> C monitor(io.micrometer.core.instrument.MeterRegistry registry,
                                                                                         C cache,
                                                                                         String cacheName,
                                                                                         Iterable<io.micrometer.core.instrument.Tag> tags)
Caffeine.recordStats() prior to building the cache
 for metrics to be recorded.C - The cache type.registry - The registry to bind metrics to.cache - The cache to instrument.cacheName - Will be used to tag metrics with "cache".tags - Tags to apply to all recorded metrics.CacheStatsprotected Long size()
size in class io.micrometer.core.instrument.binder.cache.CacheMeterBinderprotected long hitCount()
hitCount in class io.micrometer.core.instrument.binder.cache.CacheMeterBinderprotected Long missCount()
missCount in class io.micrometer.core.instrument.binder.cache.CacheMeterBinderprotected Long evictionCount()
evictionCount in class io.micrometer.core.instrument.binder.cache.CacheMeterBinderprotected long putCount()
putCount in class io.micrometer.core.instrument.binder.cache.CacheMeterBinderprotected void bindImplementationSpecificMetrics(io.micrometer.core.instrument.MeterRegistry registry)
bindImplementationSpecificMetrics in class io.micrometer.core.instrument.binder.cache.CacheMeterBinder