Package de.caluga.morphium.cache
Class MorphiumCacheJCacheImpl
java.lang.Object
de.caluga.morphium.cache.MorphiumCacheJCacheImpl
- All Implemented Interfaces:
MorphiumCache,EventListener,javax.cache.event.CacheEntryCreatedListener<Object,,CacheEntry> javax.cache.event.CacheEntryExpiredListener<Object,,CacheEntry> javax.cache.event.CacheEntryListener<Object,,CacheEntry> javax.cache.event.CacheEntryRemovedListener<Object,,CacheEntry> javax.cache.event.CacheEntryUpdatedListener<Object,CacheEntry>
public class MorphiumCacheJCacheImpl
extends Object
implements MorphiumCache, javax.cache.event.CacheEntryExpiredListener<Object,CacheEntry>, javax.cache.event.CacheEntryCreatedListener<Object,CacheEntry>, javax.cache.event.CacheEntryRemovedListener<Object,CacheEntry>, javax.cache.event.CacheEntryUpdatedListener<Object,CacheEntry>
User: Stephan Bösebeck
Date: 18.05.18
Time: 14:52
TODO: Add documentation here
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid<T> voidaddToCache(String k, Class<? extends T> type, List<T> ret) voidclearCachefor(Class<?> cls) voidvoidclose()getCacheKey(Query q) getCacheKey(Class type, Map<String, Object> qo, Map<String, Integer> sort, Map<String, Object> projection, String collection, int skip, int limit) javax.cache.CacheManager<T> List<T>getFromCache(Class<? extends T> type, String k) <T> TgetFromIDCache(Class<? extends T> type, Object id) getSizes()booleanbooleanvoidvoidvoidvoidvoidvoidremoveEntryFromCache(Class cls, Object id) voidremoveEntryFromIdCache(Class cls, Object id) voidvoidvoidsetCacheManager(javax.cache.CacheManager cacheManager) voidsetDefaultCacheTime(Class type) reset cache time settings to default, if settings were cahnged using setValidCacheTimevoidsetGlobalCacheTimeout(int tm) voidsetHouskeepingIntervalPause(int p) voidsetValidCacheTime(Class type, int time) override the settings given in @Cache annotation with this value this is useful to change cache behaviour during runtime
-
Field Details
-
RESULT_CACHE_NAME
- See Also:
-
ID_CACHE_NAME
- See Also:
-
-
Constructor Details
-
MorphiumCacheJCacheImpl
public MorphiumCacheJCacheImpl()
-
-
Method Details
-
setCacheManager
public void setCacheManager(javax.cache.CacheManager cacheManager) - Specified by:
setCacheManagerin interfaceMorphiumCache
-
getCacheManager
public javax.cache.CacheManager getCacheManager()- Specified by:
getCacheManagerin interfaceMorphiumCache
-
addToCache
- Specified by:
addToCachein interfaceMorphiumCache
-
getSizes
- Specified by:
getSizesin interfaceMorphiumCache
-
getCacheKey
public String getCacheKey(Class type, Map<String, Object> qo, Map<String, Integer> sort, Map<String, Object> projection, String collection, int skip, int limit) - Specified by:
getCacheKeyin interfaceMorphiumCache
-
getFromCache
- Specified by:
getFromCachein interfaceMorphiumCache
-
getCachedTypes
- Specified by:
getCachedTypesin interfaceMorphiumCache
-
clearCachefor
- Specified by:
clearCacheforin interfaceMorphiumCache
-
resetCache
public void resetCache()- Specified by:
resetCachein interfaceMorphiumCache
-
close
public void close()- Specified by:
closein interfaceMorphiumCache
-
removeEntryFromIdCache
- Specified by:
removeEntryFromIdCachein interfaceMorphiumCache
-
removeEntryFromCache
- Specified by:
removeEntryFromCachein interfaceMorphiumCache
-
getFromIDCache
- Specified by:
getFromIDCachein interfaceMorphiumCache
-
getCacheKey
- Specified by:
getCacheKeyin interfaceMorphiumCache
-
isCached
- Specified by:
isCachedin interfaceMorphiumCache
-
clearCacheIfNecessary
- Specified by:
clearCacheIfNecessaryin interfaceMorphiumCache
-
addCacheListener
- Specified by:
addCacheListenerin interfaceMorphiumCache
-
removeCacheListener
- Specified by:
removeCacheListenerin interfaceMorphiumCache
-
isListenerRegistered
- Specified by:
isListenerRegisteredin interfaceMorphiumCache
-
setGlobalCacheTimeout
public void setGlobalCacheTimeout(int tm) - Specified by:
setGlobalCacheTimeoutin interfaceMorphiumCache
-
setAnnotationAndReflectionHelper
- Specified by:
setAnnotationAndReflectionHelperin interfaceMorphiumCache
-
setHouskeepingIntervalPause
public void setHouskeepingIntervalPause(int p) - Specified by:
setHouskeepingIntervalPausein interfaceMorphiumCache
-
setValidCacheTime
Description copied from interface:MorphiumCacheoverride the settings given in @Cache annotation with this value this is useful to change cache behaviour during runtime- Specified by:
setValidCacheTimein interfaceMorphiumCache
-
setDefaultCacheTime
Description copied from interface:MorphiumCachereset cache time settings to default, if settings were cahnged using setValidCacheTime- Specified by:
setDefaultCacheTimein interfaceMorphiumCache
-
onCreated
- Specified by:
onCreatedin interfacejavax.cache.event.CacheEntryCreatedListener<Object,CacheEntry> - Throws:
javax.cache.event.CacheEntryListenerException
-
onExpired
- Specified by:
onExpiredin interfacejavax.cache.event.CacheEntryExpiredListener<Object,CacheEntry> - Throws:
javax.cache.event.CacheEntryListenerException
-
onRemoved
- Specified by:
onRemovedin interfacejavax.cache.event.CacheEntryRemovedListener<Object,CacheEntry> - Throws:
javax.cache.event.CacheEntryListenerException
-
onUpdated
- Specified by:
onUpdatedin interfacejavax.cache.event.CacheEntryUpdatedListener<Object,CacheEntry> - Throws:
javax.cache.event.CacheEntryListenerException
-