Class CacheAccessTracker<K,V>
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.CacheAccessTracker<K,V>
-
- All Implemented Interfaces:
Cache<K,V>
public class CacheAccessTracker<K,V> extends Object implements Cache<K,V>
Cachewrapper exposing the number of read accesses and the number of misses ot the underlying cache via theStatisticsProvider.
-
-
Constructor Summary
Constructors Constructor Description CacheAccessTracker(@NotNull String name, @NotNull StatisticsProvider statisticsProvider, @NotNull Cache<K,V> delegate)Create a new wrapper exposing the access statistics under the givennameto the passedstatisticsProvider.
-
-
-
Constructor Detail
-
CacheAccessTracker
public CacheAccessTracker(@NotNull @NotNull String name, @NotNull @NotNull StatisticsProvider statisticsProvider, @NotNull @NotNull Cache<K,V> delegate)Create a new wrapper exposing the access statistics under the givennameto the passedstatisticsProvider.- Parameters:
name- name under which to expose the access statisticsstatisticsProvider- statistics provider where the access statistics is recorded todelegate- the underlying, wrapped cache.
-
-
Method Detail
-
put
public void put(@NotNull K key, @NotNull V value)Description copied from interface:CacheAdd a mapping fromkeytovalue.
-
put
public void put(@NotNull K key, @NotNull V value, byte cost)Description copied from interface:CacheAdd a mapping fromkeytovaluewith a givencost.
-
-