|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.riotfamily.cachius.Cache
public final class Cache
The Cachius cache.
Constructor Summary | |
---|---|
Cache(File cacheDir,
int capacity,
boolean enabled)
Create the cache. |
Method Summary | |
---|---|
protected void |
addToIndex(CacheItem item)
Adds the item to the internal tag index. |
long |
getAverageOverflowInterval()
|
int |
getCapacity()
|
CacheEntry |
getItem(String key)
Returns the CacheItem with the given key or creates a new one, if no entry with that key exists. |
long |
getMaxInvalidationTime()
|
int |
getNumberOfTags()
|
int |
getSize()
|
protected void |
invalidateAll()
|
protected void |
invalidateTaggedItems(String tag)
Invalidates all items tagged with the given String. |
protected void |
removeFromIndex(CacheItem item)
Removes the item from the internal tag index. |
protected void |
resetOverflowStats()
|
protected void |
setCacheDir(File cacheDir)
Sets the directory where the cache items are stored. |
protected void |
setCapacity(int capacity)
Sets the cache capacity. |
void |
setEnabled(boolean enabled)
|
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cache(File cacheDir, int capacity, boolean enabled)
Method Detail |
---|
protected final void setCacheDir(File cacheDir)
protected final void setCapacity(int capacity)
public void setEnabled(boolean enabled)
public CacheEntry getItem(String key)
key
- The cache key
protected void removeFromIndex(CacheItem item)
protected void addToIndex(CacheItem item)
protected void invalidateTaggedItems(String tag)
protected void invalidateAll()
public int getCapacity()
public int getSize()
public int getNumberOfTags()
public long getAverageOverflowInterval()
public long getMaxInvalidationTime()
protected void resetOverflowStats()
public void shutdown()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |