## 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.Object

Wraps an ICache in requests + hits tracking.

Constructor Summary
`InstrumentingCache(ICache<K,V> map)`

Method Summary
`void` `clear()`
`boolean` `containsKey(K key)`
`V` `get(K key)`
`long` `getCapacity()`
`long` `getHits()`
`V` `getInternal(K key)`
`java.util.Set<K>` `getKeySet()`
`double` `getRecentHitRate()`
`long` `getRequests()`
`java.util.Set<K>` `hotKeySet(int n)`
`boolean` `isCapacitySetManually()`
`boolean` `isPutCopying()`
`void` `put(K key, V value)`
`boolean` `putIfAbsent(K key, V value)`
`void` `remove(K key)`
`boolean` `replace(K key, V old, V value)`
`void` `setCapacity(long capacity)`
`int` `size()`
`void` `updateCapacity(long capacity)`
`long` `weightedSize()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InstrumentingCache

    public InstrumentingCache(ICache<K,V> map)

Method Detail

### 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()

### isCapacitySetManually

    public boolean isCapacitySetManually()

### updateCapacity

    public void updateCapacity(long capacity)

### setCapacity

    public void setCapacity(long capacity)

### size

    public int size()

### weightedSize

    public long weightedSize()

### getHits

    public long getHits()

### getRequests

    public long getRequests()

### getRecentHitRate

    public double getRecentHitRate()

### clear

    public void clear()

### getKeySet

    public java.util.Set<K> getKeySet()

### hotKeySet

    public java.util.Set<K> hotKeySet(int n)

### containsKey

    public boolean containsKey(K key)

### isPutCopying

    public boolean isPutCopying()

Copyright © 2013 The Apache Software Foundation