Interface CacheStatisticsCollector
- All Superinterfaces:
CacheStatisticsProvider
The statistics collector supports capturing of relevant
RedisCache operations such as
hits & misses.- Since:
- 2.4
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionstatic CacheStatisticsCollectorcreate()default voidincDeletes(String cacheName) Increase the counter for delete operations of the given cache.voidincDeletesBy(String cacheName, int value) Increase the counter for delete operations of the given cache by the given value.voidIncrease the counter for get operations of the given cache.voidIncrease the counter for get operations with result of the given cache.voidincLockTime(String cacheName, long durationNS) Increase the gauge for sync lock duration of the cache by the given nanoseconds.voidIncrease the counter for get operations without result of the given cache.voidIncrease the counter for put operations of the given cache.static CacheStatisticsCollectornone()voidReset the all counters and gauges of for the given cache.Methods inherited from interface org.springframework.data.redis.cache.CacheStatisticsProvider
getCacheStatistics
-
Method Details
-
incPuts
Increase the counter for put operations of the given cache.- Parameters:
cacheName- must not be null.
-
incGets
Increase the counter for get operations of the given cache.- Parameters:
cacheName- must not be null.
-
incHits
Increase the counter for get operations with result of the given cache.- Parameters:
cacheName- must not be null.
-
incMisses
Increase the counter for get operations without result of the given cache.- Parameters:
cacheName- must not be null.
-
incDeletes
Increase the counter for delete operations of the given cache.- Parameters:
cacheName- must not be null.
-
incDeletesBy
Increase the counter for delete operations of the given cache by the given value.- Parameters:
cacheName- must not be null.
-
incLockTime
Increase the gauge for sync lock duration of the cache by the given nanoseconds.- Parameters:
cacheName- must not be null.
-
reset
Reset the all counters and gauges of for the given cache.- Parameters:
cacheName- must not be null.
-
none
- Returns:
- a
CacheStatisticsCollectorthat performs no action.
-
create
- Returns:
- a default
CacheStatisticsCollectorimplementation.
-