|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.common.cache.LFUCache<K,V>
public class LFUCache<K,V>
Constructor Summary | |
---|---|
LFUCache(int capacity)
|
Method Summary | |
---|---|
long |
capacity()
returns the total capacity of the cache defined at contruction time |
boolean |
contains(K key)
returns true if the Cache contains the key |
V |
get(K key)
Gets the Value from the Cache, If the object doesnt exist default behaviour is to return null. |
int |
getEvictionCount()
|
V |
quickGet(K key)
|
void |
set(K key,
V value)
puts the key and its value into the cache |
long |
size()
returns the current size of the cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LFUCache(int capacity)
Method Detail |
---|
public long capacity()
Cache
capacity
in interface Cache<K,V>
public int getEvictionCount()
public V get(K key)
Cache
get
in interface Cache<K,V>
public V quickGet(K key)
public void set(K key, V value)
Cache
set
in interface Cache<K,V>
public long size()
Cache
size
in interface Cache<K,V>
public boolean contains(K key)
Cache
contains
in interface Cache<K,V>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |