Package org.apache.cassandra.cache
Class InstrumentingCache<K,V>
- java.lang.Object
-
- org.apache.cassandra.cache.InstrumentingCache<K,V>
-
- Direct Known Subclasses:
AutoSavingCache
public class InstrumentingCache<K,V> extends java.lang.ObjectWraps an ICache in requests + hits tracking.
-
-
Constructor Summary
Constructors Constructor Description InstrumentingCache(java.lang.String type, ICache<K,V> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(K key)Vget(K key)longgetCapacity()VgetInternal(K key)CacheMetricsgetMetrics()java.util.Iterator<K>hotKeyIterator(int n)java.util.Iterator<K>keyIterator()voidput(K key, V value)booleanputIfAbsent(K key, V value)voidremove(K key)booleanreplace(K key, V old, V value)voidsetCapacity(long capacity)intsize()longweightedSize()
-
-
-
Method Detail
-
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 java.util.Iterator<K> keyIterator()
-
hotKeyIterator
public java.util.Iterator<K> hotKeyIterator(int n)
-
containsKey
public boolean containsKey(K key)
-
getMetrics
public CacheMetrics getMetrics()
-
-