|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.photoviewer.client.util.MRUCache
MRUCache implements a "most recently used" cache.
Constructor Summary | |
MRUCache(int maxSize,
int maxItemSize)
Constructor |
Method Summary | |
void |
clear()
Clear the cache. |
byte[] |
get(java.lang.String key)
Get the value associated to the key from the cache. |
void |
put(java.lang.String key,
byte[] value)
Store a key-value pair in the MRUCache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MRUCache(int maxSize, int maxItemSize)
maxSize
- int maximum capacity of this MRUCache.Method Detail |
public void put(java.lang.String key, byte[] value)
key
- String key used to index items in the cache.value
- the value associated to the key.public byte[] get(java.lang.String key)
key
- String key used to index the items in the cache.
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |