|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jmage.cache.LRUDiskCache
public class LRUDiskCache
A simple disk cache.
| Nested Class Summary | |
|---|---|
static class |
LRUDiskCache.CacheFilter
|
static class |
LRUDiskCache.ModificationComparator
|
| Field Summary | |
|---|---|
protected java.io.File |
cacheDir
|
protected static LRUDiskCache.CacheFilter |
cacheFilter
|
protected int |
capacity
|
protected static org.apache.log4j.Logger |
log
|
protected static LRUDiskCache.ModificationComparator |
modificationComparator
|
| Constructor Summary | |
|---|---|
LRUDiskCache()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy the cache |
int |
getCapacity()
|
int |
getSize()
|
void |
init(java.util.Properties properties)
Initialize the cache using Properties |
void |
pageIn(java.lang.Object key,
java.lang.Object object)
Pages an object into the cache, affecting it's cache ranking. |
java.lang.Object |
pageOut(java.lang.Object key)
Pages an object out of the cache, affecting it's cache ranking. |
void |
remove(java.lang.Object key)
Removes an object from the cache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int capacity
protected java.io.File cacheDir
protected static LRUDiskCache.CacheFilter cacheFilter
protected static LRUDiskCache.ModificationComparator modificationComparator
protected static org.apache.log4j.Logger log
| Constructor Detail |
|---|
public LRUDiskCache()
| Method Detail |
|---|
public void init(java.util.Properties properties)
throws CacheException
Cache
init in interface CacheCacheExceptionpublic int getCapacity()
public int getSize()
public void pageIn(java.lang.Object key,
java.lang.Object object)
throws CacheException
Cache
pageIn in interface Cachekey - the keyobject - the object
CacheException
public java.lang.Object pageOut(java.lang.Object key)
throws CacheException
Cache
pageOut in interface Cachekey - the object's cache key
CacheException
public void remove(java.lang.Object key)
throws CacheException
Cache
remove in interface Cachekey - the object's cache key
CacheException
public void destroy()
throws CacheException
Cache
destroy in interface CacheCacheException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||