com.jdon.domain.model.cache
类 ModelCacheManager

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

public class ModelCacheManager
extends Object
implements Startable


字段摘要
protected  CacheManager cacheManager
           
 
构造方法摘要
ModelCacheManager(CacheManager cacheManager)
           
 
方法摘要
 void clearCache()
           
 boolean containInCache(Object dataKey, String modelClassName)
           
 Object getCache(Object dataKey, String modelClassName)
          将数据ID, Model类类型组合成Key的对应Model从缓存中取出
 CacheManager getCacheManager()
           
 Object getPModel(Class modelClass)
           
 void removeCache(Object dataKey)
          清除缓存中该dataKey的相关所有缓存数据 dataKey即数据的主键ID数值
 void removeCache2(Object dataKey, String modelClassName)
          将数据ID, Model类类型组合成Key的对应Model从缓存中取出
 void saveCache(Object dataKey, String modelClassName, Object model)
          将数据ID, Model类类型组合成Key, 将对应的Model保存到缓存
protected  void saveToCache(CacheKey cachKey, Object model)
           
 void setCacheManager(CacheManager cacheManager)
           
 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

protected CacheManager cacheManager
构造方法详细信息

ModelCacheManager

public ModelCacheManager(CacheManager cacheManager)
方法详细信息

start

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

指定者:
接口 Startable 中的 start

stop

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

指定者:
接口 Startable 中的 stop

getPModel

public Object getPModel(Class modelClass)

saveCache

public void saveCache(Object dataKey,
                      String modelClassName,
                      Object model)
将数据ID, Model类类型组合成Key, 将对应的Model保存到缓存

参数:
dataKey -
modelClassName -
model -

saveToCache

protected void saveToCache(CacheKey cachKey,
                           Object model)

getCache

public Object getCache(Object dataKey,
                       String modelClassName)
将数据ID, Model类类型组合成Key的对应Model从缓存中取出

参数:
dataKey -
modelClassName -
返回:
Model

containInCache

public boolean containInCache(Object dataKey,
                              String modelClassName)

removeCache

public void removeCache(Object dataKey)
清除缓存中该dataKey的相关所有缓存数据 dataKey即数据的主键ID数值

参数:
dataKey -
formName -

removeCache2

public void removeCache2(Object dataKey,
                         String modelClassName)
将数据ID, Model类类型组合成Key的对应Model从缓存中取出

参数:
dataKey -
modelClassName -

clearCache

public void clearCache()

getCacheManager

public CacheManager getCacheManager()

setCacheManager

public void setCacheManager(CacheManager cacheManager)


Copyright © 2013. All Rights Reserved.