Package io.micrometer.spring.cache
Class ConcurrentMapCacheMetrics
- java.lang.Object
-
- io.micrometer.core.instrument.binder.cache.CacheMeterBinder
-
- io.micrometer.spring.cache.ConcurrentMapCacheMetrics
-
- All Implemented Interfaces:
io.micrometer.core.instrument.binder.MeterBinder
public class ConcurrentMapCacheMetrics extends io.micrometer.core.instrument.binder.cache.CacheMeterBinder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConcurrentMapCacheMetrics.MonitoredConcurrentMapCache
AConcurrentMapCache
wrapper that collects metrics on its use.
-
Constructor Summary
Constructors Constructor Description ConcurrentMapCacheMetrics(org.springframework.cache.concurrent.ConcurrentMapCache cache, java.lang.Iterable<io.micrometer.core.instrument.Tag> tags)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bindImplementationSpecificMetrics(io.micrometer.core.instrument.MeterRegistry registry)
protected java.lang.Long
evictionCount()
ConcurrentMapCacheMetrics.MonitoredConcurrentMapCache
getMonitoredCache()
protected long
hitCount()
protected java.lang.Long
missCount()
static org.springframework.cache.concurrent.ConcurrentMapCache
monitor(io.micrometer.core.instrument.MeterRegistry registry, org.springframework.cache.concurrent.ConcurrentMapCache cache, java.lang.Iterable<io.micrometer.core.instrument.Tag> tags)
Record metrics on a ConcurrentMapCache cache.static org.springframework.cache.concurrent.ConcurrentMapCache
monitor(io.micrometer.core.instrument.MeterRegistry registry, org.springframework.cache.concurrent.ConcurrentMapCache cache, java.lang.String... tags)
Record metrics on a ConcurrentMapCache cache.protected long
putCount()
protected java.lang.Long
size()
-
-
-
Method Detail
-
monitor
public static org.springframework.cache.concurrent.ConcurrentMapCache monitor(io.micrometer.core.instrument.MeterRegistry registry, org.springframework.cache.concurrent.ConcurrentMapCache cache, java.lang.String... tags)
Record metrics on a ConcurrentMapCache cache.- Parameters:
registry
- The registry to bind metrics to.cache
- The cache to instrument.tags
- Tags to apply to all recorded metrics. Must be an even number of arguments representing key/value pairs of tags.- Returns:
- The instrumented cache, unchanged. The original cache is not wrapped or proxied in any way.
-
monitor
public static org.springframework.cache.concurrent.ConcurrentMapCache monitor(io.micrometer.core.instrument.MeterRegistry registry, org.springframework.cache.concurrent.ConcurrentMapCache cache, java.lang.Iterable<io.micrometer.core.instrument.Tag> tags)
Record metrics on a ConcurrentMapCache cache.- Parameters:
registry
- The registry to bind metrics to.cache
- The cache to instrument.tags
- Tags to apply to all recorded metrics.- Returns:
- The instrumented cache, unchanged. The original cache is not wrapped or proxied in any way.
-
getMonitoredCache
public ConcurrentMapCacheMetrics.MonitoredConcurrentMapCache getMonitoredCache()
- Returns:
- A
ConcurrentMapCache
wrapper that collects metrics on its use.
-
size
protected java.lang.Long size()
- Specified by:
size
in classio.micrometer.core.instrument.binder.cache.CacheMeterBinder
-
hitCount
protected long hitCount()
- Specified by:
hitCount
in classio.micrometer.core.instrument.binder.cache.CacheMeterBinder
-
missCount
protected java.lang.Long missCount()
- Specified by:
missCount
in classio.micrometer.core.instrument.binder.cache.CacheMeterBinder
-
evictionCount
protected java.lang.Long evictionCount()
- Specified by:
evictionCount
in classio.micrometer.core.instrument.binder.cache.CacheMeterBinder
-
putCount
protected long putCount()
- Specified by:
putCount
in classio.micrometer.core.instrument.binder.cache.CacheMeterBinder
-
bindImplementationSpecificMetrics
protected void bindImplementationSpecificMetrics(io.micrometer.core.instrument.MeterRegistry registry)
- Specified by:
bindImplementationSpecificMetrics
in classio.micrometer.core.instrument.binder.cache.CacheMeterBinder
-
-