com.jdon.model.query.cache
Class BlockCacheManager
java.lang.Object
com.jdon.controller.cache.CacheKeyFactory
com.jdon.model.query.cache.BlockCacheManager
public class BlockCacheManager
- extends CacheKeyFactory
query block manager.
batch query will get a collection result that it is a block,
this block will be cached, next time, we lookup the result
in the block that existed in cache, maybe in the block there
are those promary keys collection, so reducing visiting database.
the block is made of the primary keys of all models.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CACHE_TYPE_BLOCK
public static final java.lang.String CACHE_TYPE_BLOCK
- See Also:
- Constant Field Values
BlockCacheManager
public BlockCacheManager(CacheManager cacheManager)
getBlockKeysFromCache
public java.util.List getBlockKeysFromCache(QueryConditonDatakey qckey)
getCacheKey
public CacheKey getCacheKey(QueryConditonDatakey qckey)
saveBlockKeys
public void saveBlockKeys(QueryConditonDatakey qckey,
java.util.List keys)
getAllCountsFromCache
public java.lang.Integer getAllCountsFromCache(QueryConditonDatakey qckey)
saveAllCounts
public void saveAllCounts(QueryConditonDatakey qckey,
java.lang.Integer allCount)
createCacheKeyImp
public CacheKey createCacheKeyImp(java.lang.Object dataKey,
java.lang.String typeName)
- Specified by:
createCacheKeyImp in class CacheKeyFactory
clearCache
public void clearCache()