public class MorphiumCacheImpl extends Object implements MorphiumCache
| Constructor and Description |
|---|
MorphiumCacheImpl() |
public void setGlobalCacheTimeout(int tm)
setGlobalCacheTimeout in interface MorphiumCachepublic void setHouskeepingIntervalPause(int p)
setHouskeepingIntervalPause in interface MorphiumCachepublic void setAnnotationAndReflectionHelper(AnnotationAndReflectionHelper hlp)
setAnnotationAndReflectionHelper in interface MorphiumCachepublic void addCacheListener(CacheListener cl)
addCacheListener in interface MorphiumCachepublic boolean isListenerRegistered(CacheListener cl)
isListenerRegistered in interface MorphiumCachepublic void removeCacheListener(CacheListener cl)
removeCacheListener in interface MorphiumCachepublic <T> void addToCache(String k, Class<? extends T> type, List<T> ret)
addToCache in interface MorphiumCacheT - - Type of recordk - - Key, usually the mongodb query string - should be created by createCacheKeytype - - class typeret - - list of resultspublic void clearCacheIfNecessary(Class cls)
clearCacheIfNecessary in interface MorphiumCachepublic boolean isCached(Class<?> type, String k)
isCached in interface MorphiumCachepublic <T> List<T> getFromCache(Class<? extends T> type, String k)
getFromCache in interface MorphiumCacheT - - type paramtype - - typek - - cache keypublic Map<Class<?>,Map<String,CacheElement>> getCache()
getCache in interface MorphiumCachepublic void setCache(Map<Class<?>,Map<String,CacheElement>> cache)
setCache in interface MorphiumCachepublic Map<Class<?>,Map<Object,Object>> getIdCache()
getIdCache in interface MorphiumCachepublic void setIdCache(Map<Class<?>,Map<Object,Object>> c)
setIdCache in interface MorphiumCachepublic <T> T getFromIDCache(Class<? extends T> type, Object id)
getFromIDCache in interface MorphiumCachepublic void setValidCacheTime(Class type, int time)
setValidCacheTime in interface MorphiumCachepublic void setDefaultCacheTime(Class type)
setDefaultCacheTime in interface MorphiumCachepublic String getCacheKey(Class type, Map<String,Object> qo, Map<String,Integer> sort, Map<String,Object> projection, String collection, int skip, int limit)
getCacheKey in interface MorphiumCachepublic String getCacheKey(Query q)
getCacheKey in interface MorphiumCacheq - the querypublic void clearCachefor(Class<?> cls)
clearCachefor in interface MorphiumCachepublic void resetCache()
resetCache in interface MorphiumCachepublic void removeEntryFromCache(Class cls, Object id)
removeEntryFromCache in interface MorphiumCacheCopyright © 2017. All rights reserved.