|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jdon.controller.cache.CacheManager
public class CacheManager
Cacahe Managerment Pattern Client objects request objects from a CacheManager object by calling its fetchObject method. The argument to the fetchObject method is an CacheKey object that identifies the object to fetch. The fetchObject method works by first calling the Cache object’s fetchObject method. there is one CacheManager in jdon container, you can get it from the container, do not need create it.
| Field Summary | |
|---|---|
static java.lang.String |
module
|
| Constructor Summary | |
|---|---|
CacheManager(Cache cache)
|
|
| Method Summary | |
|---|---|
void |
clear()
|
java.lang.Object |
fetchObject(StringKey key)
从缓存中获得缓存 |
Cache |
getCache()
|
java.util.Map |
getCacheKeyMap()
|
void |
putObect(StringKey key,
java.lang.Object value)
保存到缓存中 |
void |
removeCache(java.lang.Object dataKey,
CacheKeyFactory cacheKeyFactory)
清除缓存中该dataKey的相关所有缓存数? 当该dataKey相关的数据增删改时,调用本方法?以便及时清除缓存?? dataKey是数据的ID,如ProductId , ItemId? |
void |
removeObect(StringKey key)
清除缓存 |
void |
setCache(Cache cache)
|
void |
setCacheKeyMap(java.util.Map cacheKeyMap)
|
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String module
| Constructor Detail |
|---|
public CacheManager(Cache cache)
| Method Detail |
|---|
public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void clear()
public java.lang.Object fetchObject(StringKey key)
cacheKey -
public void putObect(StringKey key,
java.lang.Object value)
cacheKey - value - public void removeObect(StringKey key)
cacheKey -
public void removeCache(java.lang.Object dataKey,
CacheKeyFactory cacheKeyFactory)
dataKey - formName - public java.util.Map getCacheKeyMap()
public void setCacheKeyMap(java.util.Map cacheKeyMap)
public Cache getCache()
public void setCache(Cache cache)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||