public class CacheAccessTracker<K,V> extends java.lang.Object implements Cache<K,V>
Cache
wrapper exposing the number of read accesses and the
number of misses ot the underlying cache via the StatisticsProvider
.Constructor and Description |
---|
CacheAccessTracker(@NotNull java.lang.String name,
@NotNull StatisticsProvider statisticsProvider,
@NotNull Cache<K,V> delegate)
Create a new wrapper exposing the access statistics under the given
name to the passed statisticsProvider . |
public CacheAccessTracker(@NotNull @NotNull java.lang.String name, @NotNull @NotNull StatisticsProvider statisticsProvider, @NotNull @NotNull Cache<K,V> delegate)
name
to the passed statisticsProvider
.name
- name under which to expose the access statisticsstatisticsProvider
- statistics provider where the access statistics is recorded todelegate
- the underlying, wrapped cache.Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.