com.jdon.controller.cache
类 CacheManager

java.lang.Object
  继承者 com.jdon.controller.cache.CacheManager
所有已实现的接口:
Startable

public class CacheManager
extends Object
implements Startable

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.

作者:
banq

构造方法摘要
CacheManager(Cache cache)
           
 
方法摘要
 void clear()
           
 boolean containObject(StringKey skey)
           
 Object fetchObject(String skey)
           
 Object fetchObject(StringKey skey)
          从缓存中获得缓存
 Cache getCache()
           
 void putObect(CacheKey ckey, Object value)
          保存到缓存中
 void putObect(String skey, Object value)
           
 void removeCache(Object dataKey)
          清除缓存中该dataKey的相关所有缓存数据 当该dataKey相关的数据增删改时,调用本方法。
 void removeObect(String skey)
           
 void removeObect(StringKey skey)
          清除缓存
 void start()
          Start this component.
 void stop()
          Stop this component.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

CacheManager

public CacheManager(Cache cache)
方法详细信息

start

public void start()
从接口 Startable 复制的描述
Start this component.

指定者:
接口 Startable 中的 start

stop

public void stop()
从接口 Startable 复制的描述
Stop this component.

指定者:
接口 Startable 中的 stop

clear

public void clear()

fetchObject

public Object fetchObject(StringKey skey)
从缓存中获得缓存

参数:
cacheKey -
返回:

fetchObject

public Object fetchObject(String skey)

containObject

public boolean containObject(StringKey skey)

putObect

public void putObect(CacheKey ckey,
                     Object value)
保存到缓存中

参数:
cacheKey -
value -

putObect

public void putObect(String skey,
                     Object value)

removeObect

public void removeObect(StringKey skey)
清除缓存

参数:
cacheKey -

removeObect

public void removeObect(String skey)

removeCache

public void removeCache(Object dataKey)
清除缓存中该dataKey的相关所有缓存数据 当该dataKey相关的数据增删改时,调用本方法。以便及时清除缓存。 dataKey是数据的ID,如ProductId , ItemId等

参数:
dataKey -
formName -

getCache

public Cache getCache()


Copyright © 2013. All Rights Reserved.