|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<Serializable,Serializable>
net.spy.cache.DiskCache
public class 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/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
DiskCache(String base)
Get an DiskObject using the given directory. |
|
DiskCache(String base,
int lruCacheSize)
Get a DiskCache using the given directory with a backing LRU cache of the specified size. |
|
| Method Summary | |
|---|---|
Set<Map.Entry<Serializable,Serializable>> |
entrySet()
|
Serializable |
get(Object key)
Get an object from the cache. |
String |
getBaseDir()
Get the base directory which this cache is watching. |
Serializable |
put(Serializable k,
Serializable v)
Store an object in the cache. |
| 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 base)
public DiskCache(String base,
int lruCacheSize)
base - the base directory for the disk cachelruCacheSize - the size of the LRU cache holding recently accessed
objects| Method Detail |
|---|
public String getBaseDir()
public Serializable put(Serializable k,
Serializable v)
put in interface Map<Serializable,Serializable>put in class AbstractMap<Serializable,Serializable>k - object keyv - value
public Serializable get(Object key)
get in interface Map<Serializable,Serializable>get in class AbstractMap<Serializable,Serializable>public Set<Map.Entry<Serializable,Serializable>> entrySet()
entrySet in interface Map<Serializable,Serializable>entrySet in class AbstractMap<Serializable,Serializable>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||