Class InstrumentingCache<K,V>

java.lang.Object
org.apache.cassandra.cache.InstrumentingCache<K,V>
Direct Known Subclasses:
AutoSavingCache

public class InstrumentingCache<K,V> extends Object
Wraps an ICache in requests + hits tracking.
  • Constructor Details

    • InstrumentingCache

      public InstrumentingCache(String type, ICache<K,V> map)
  • Method Details

    • put

      public void put(K key, V value)
    • putIfAbsent

      public boolean putIfAbsent(K key, V value)
    • replace

      public boolean replace(K key, V old, V value)
    • get

      public V get(K key)
    • getInternal

      public V getInternal(K key)
    • remove

      public void remove(K key)
    • getCapacity

      public long getCapacity()
    • setCapacity

      public void setCapacity(long capacity)
    • size

      public int size()
    • weightedSize

      public long weightedSize()
    • clear

      public void clear()
    • keyIterator

      public Iterator<K> keyIterator()
    • hotKeyIterator

      public Iterator<K> hotKeyIterator(int n)
    • containsKey

      public boolean containsKey(K key)
    • getMetrics

      public CacheMetrics getMetrics()