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>
TODO: Add documentation here
| Modifier and Type | Field and Description |
|---|---|
static String |
ID_CACHE_NAME |
static String |
RESULT_CACHE_NAME |
| Constructor and Description |
|---|
MorphiumCacheJCacheImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCacheListener(CacheListener cl) |
<T> void |
addToCache(String k,
Class<? extends T> type,
List<T> ret) |
void |
clearCachefor(Class<?> cls) |
void |
clearCacheIfNecessary(Class cls) |
void |
close() |
Set<Class<?>> |
getCachedTypes() |
String |
getCacheKey(Class type,
Map<String,Object> qo,
Map<String,Integer> sort,
Map<String,Object> projection,
String collection,
int skip,
int limit) |
String |
getCacheKey(Query q) |
javax.cache.CacheManager |
getCacheManager() |
<T> List<T> |
getFromCache(Class<? extends T> type,
String k) |
<T> T |
getFromIDCache(Class<? extends T> type,
Object id) |
Map<String,Integer> |
getSizes() |
boolean |
isCached(Class<?> type,
String k) |
boolean |
isListenerRegistered(CacheListener cl) |
void |
onCreated(Iterable iterable) |
void |
onExpired(Iterable iterable) |
void |
onRemoved(Iterable iterable) |
void |
onUpdated(Iterable iterable) |
void |
removeCacheListener(CacheListener cl) |
void |
removeEntryFromCache(Class cls,
Object id) |
void |
removeEntryFromIdCache(Class cls,
Object id) |
void |
resetCache() |
void |
setAnnotationAndReflectionHelper(AnnotationAndReflectionHelper hlp) |
void |
setCacheManager(javax.cache.CacheManager cacheManager) |
void |
setDefaultCacheTime(Class type)
reset cache time settings to default, if settings were cahnged using setValidCacheTime
|
void |
setGlobalCacheTimeout(int tm) |
void |
setHouskeepingIntervalPause(int p) |
void |
setValidCacheTime(Class type,
int time)
override the settings given in @Cache annotation with this value
this is useful to change cache behaviour during runtime
|
public static final String RESULT_CACHE_NAME
public static final String ID_CACHE_NAME
public void setCacheManager(javax.cache.CacheManager cacheManager)
setCacheManager in interface MorphiumCachepublic javax.cache.CacheManager getCacheManager()
getCacheManager in interface MorphiumCachepublic <T> void addToCache(String k, Class<? extends T> type, List<T> ret)
addToCache in interface MorphiumCachepublic Map<String,Integer> getSizes()
getSizes 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 <T> List<T> getFromCache(Class<? extends T> type, String k)
getFromCache in interface MorphiumCachepublic Set<Class<?>> getCachedTypes()
getCachedTypes in interface MorphiumCachepublic void clearCachefor(Class<?> cls)
clearCachefor in interface MorphiumCachepublic void resetCache()
resetCache in interface MorphiumCachepublic void close()
close in interface MorphiumCachepublic void removeEntryFromIdCache(Class cls, Object id)
removeEntryFromIdCache in interface MorphiumCachepublic void removeEntryFromCache(Class cls, Object id)
removeEntryFromCache in interface MorphiumCachepublic <T> T getFromIDCache(Class<? extends T> type, Object id)
getFromIDCache in interface MorphiumCachepublic String getCacheKey(Query q)
getCacheKey in interface MorphiumCachepublic boolean isCached(Class<?> type, String k)
isCached in interface MorphiumCachepublic void clearCacheIfNecessary(Class cls)
clearCacheIfNecessary in interface MorphiumCachepublic void addCacheListener(CacheListener cl)
addCacheListener in interface MorphiumCachepublic void removeCacheListener(CacheListener cl)
removeCacheListener in interface MorphiumCachepublic boolean isListenerRegistered(CacheListener cl)
isListenerRegistered in interface MorphiumCachepublic void setGlobalCacheTimeout(int tm)
setGlobalCacheTimeout in interface MorphiumCachepublic void setAnnotationAndReflectionHelper(AnnotationAndReflectionHelper hlp)
setAnnotationAndReflectionHelper in interface MorphiumCachepublic void setHouskeepingIntervalPause(int p)
setHouskeepingIntervalPause in interface MorphiumCachepublic void setValidCacheTime(Class type, int time)
MorphiumCachesetValidCacheTime in interface MorphiumCachepublic void setDefaultCacheTime(Class type)
MorphiumCachesetDefaultCacheTime in interface MorphiumCachepublic void onCreated(Iterable iterable) throws javax.cache.event.CacheEntryListenerException
onCreated in interface javax.cache.event.CacheEntryCreatedListener<Object,CacheEntry>javax.cache.event.CacheEntryListenerExceptionpublic void onExpired(Iterable iterable) throws javax.cache.event.CacheEntryListenerException
onExpired in interface javax.cache.event.CacheEntryExpiredListener<Object,CacheEntry>javax.cache.event.CacheEntryListenerExceptionpublic void onRemoved(Iterable iterable) throws javax.cache.event.CacheEntryListenerException
onRemoved in interface javax.cache.event.CacheEntryRemovedListener<Object,CacheEntry>javax.cache.event.CacheEntryListenerExceptionpublic void onUpdated(Iterable iterable) throws javax.cache.event.CacheEntryListenerException
onUpdated in interface javax.cache.event.CacheEntryUpdatedListener<Object,CacheEntry>javax.cache.event.CacheEntryListenerExceptionCopyright © 2021. All rights reserved.