|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apertereports.util.cache.MapCache
public class MapCache
A simple map cache. Each instance has its own generated id. The id is used to identify the cache within the
cache-monitoring thread in MapCacheManager.
| Constructor Summary | |
|---|---|
MapCache()
Constructs a new instance with a generated id. |
|
| Method Summary | |
|---|---|
void |
cacheData(String key,
long interval,
Object data)
Caches the data internally and registers the cached object in the MapCacheManager. |
protected void |
clearCache()
|
String |
getId()
|
protected void |
invalidateObject(String key)
|
Object |
provideData(String key)
Provides the object identified by key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapCache()
| Method Detail |
|---|
public void cacheData(String key,
long interval,
Object data)
MapCacheManager.
Each object is identified with a key and an interval of time the cache is valid.
The interval of value 0 means the object should never be cached.
On the other hand, the interval of value -1 means the object is to be cached forever.
key - Object keyinterval - Interval the cache is validdata - Cached objectpublic Object provideData(String key)
key - Object key
protected void clearCache()
protected void invalidateObject(String key)
public String getId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||