|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openjena.atlas.lib.cache.CacheLRU<K,V>
public class CacheLRU<K,V>
This class is not thread-safe. Add a synchronization wrapper if needed (@link{CacheFcatory.createSync)}
| Constructor Summary | |
|---|---|
CacheLRU(float loadFactor,
int maxSize)
|
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsKey(K key)
Does the cache contain the key? |
V |
get(K key)
Get from cache - or return null. |
boolean |
isEmpty()
|
Iterator<K> |
keys()
Iterate over all keys. |
V |
put(K key,
V thing)
Insert into from cache and return old value (or null if none) |
boolean |
remove(K key)
Remove from cache - return true if key referenced an entry |
void |
setDropHandler(ActionKeyValue<K,V> dropHandler)
Callback for entries when dropped from the cache |
long |
size()
Current size of cache |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheLRU(float loadFactor,
int maxSize)
| Method Detail |
|---|
public void clear()
clear in interface Cache<K,V>public boolean containsKey(K key)
Cache
containsKey in interface Cache<K,V>public V get(K key)
Cache
get in interface Cache<K,V>
public V put(K key,
V thing)
Cache
put in interface Cache<K,V>public boolean remove(K key)
Cache
remove in interface Cache<K,V>public long size()
Cache
size in interface Cache<K,V>public Iterator<K> keys()
Cache
keys in interface Cache<K,V>public boolean isEmpty()
isEmpty in interface Cache<K,V>public void setDropHandler(ActionKeyValue<K,V> dropHandler)
setDropHandler in interface Cache<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||