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 CacheStatisticsCollector
create()
default void
incDeletes
(String cacheName) Increase the counter for delete operations of the given cache.void
incDeletesBy
(String cacheName, int value) Increase the counter for delete operations of the given cache by the given value.void
Increase the counter for get operations of the given cache.void
Increase the counter for get operations with result of the given cache.void
incLockTime
(String cacheName, long durationNS) Increase the gauge for sync lock duration of the cache by the given nanoseconds.void
Increase the counter for get operations without result of the given cache.void
Increase the counter for put operations of the given cache.static CacheStatisticsCollector
none()
void
Reset 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
CacheStatisticsCollector
that performs no action.
-
create
- Returns:
- a default
CacheStatisticsCollector
implementation.
-