|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.kernel.impl.cache.ReferenceCache<K,V>
org.neo4j.kernel.impl.cache.WeakLruCache<K,V>
public class WeakLruCache<K,V>
| Constructor Summary | |
|---|---|
WeakLruCache(String name)
|
|
| Method Summary | |
|---|---|
void |
clear()
Removing all cached elements. |
void |
elementCleaned(V value)
|
V |
get(K key)
Returns the cached element for key. |
String |
getName()
Returns the name of the cache. |
long |
hitCount()
|
boolean |
isAdaptive()
|
int |
maxSize()
|
long |
missCount()
|
protected void |
pollClearedValues()
|
void |
put(K key,
V value)
Adds element to cache. |
void |
putAll(Map<K,V> map)
|
V |
remove(K key)
Removes the element for key from cache and returns it. |
void |
resize(int newSize)
|
void |
setAdaptiveStatus(boolean status)
|
int |
size()
Returns the cache size. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WeakLruCache(String name)
| Method Detail |
|---|
public void put(K key,
V value)
Cacheelement to cache.
key - the key for the elementpublic void putAll(Map<K,V> map)
public V get(K key)
Cachekey. If the element isn't
in cache null is returned.
key - the key for the element
null if element didn't existpublic V remove(K key)
Cachekey from cache and returns it. If
the no element for key exists null is
returned.
key - the key for the element
null if element didn't
existprotected void pollClearedValues()
pollClearedValues in class ReferenceCache<K,V>public int size()
Cache
public void clear()
Cache
public long hitCount()
public long missCount()
public void elementCleaned(V value)
public String getName()
Cache
public boolean isAdaptive()
public int maxSize()
public void resize(int newSize)
public void setAdaptiveStatus(boolean status)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||