|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.AbstractMap
net.spy.cache.DiskCache
Simple local disk caching. This is used for terribly simple caches with no expiration dates on objects. Things go in and they stay in.
| Nested Class Summary |
| Nested classes inherited from class java.util.Map |
Map.Entry |
| Constructor Summary | |
DiskCache(String basedir)
Get an DiskObject using the given directory. |
|
DiskCache(String basedir,
int lruCacheSize)
Get a DiskCache using the given directory with a backing LRU cache of the specified size. |
|
| Method Summary | |
Set |
entrySet()
|
Object |
get(Object key)
Get an object from the cache. |
String |
getBaseDir()
Get the base directory which this cache is watching. |
Object |
getObject(String key)
Deprecated. use get(Object) instead |
Object |
put(Object k,
Object v)
Store an object in the cache. |
void |
storeObject(String key,
Object o)
Deprecated. use put(Object,Object) instead |
| Methods inherited from class java.util.AbstractMap |
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DiskCache(String basedir)
public DiskCache(String basedir,
int lruCacheSize)
basedir - the base directory for the disk cachelruCacheSize - the size of the LRU cache holding recently accessed
objects| Method Detail |
public String getBaseDir()
public Object put(Object k,
Object v)
k - object keyv - value
public void storeObject(String key,
Object o)
throws IOException
IOExceptionpublic Object get(Object key)
public Set entrySet()
public Object getObject(String key)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||