Package de.xima.fc.api.cache
Class GenericDataCache
java.lang.Object
de.xima.fc.api.cache.AGenericDataCache
de.xima.fc.api.cache.GenericDataCache
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends de.xima.cmn.dao.interfaces.ILockableEntity<?>>
voidcacheStringData
(UserContext uc, T entity, String dataToCache) Writes the given data into the cache under the locking version of the given entity.static com.alibaba.fastjson.JSONObject
getCachedI18nValues
(UserContext uc, Mandant client) static com.alibaba.fastjson.JSONObject
getCachedI18nValues
(UserContext uc, Textbaustein template) static <T extends de.xima.cmn.dao.interfaces.IEntity<?>>
StringgetEntryKey
(T entity) static org.ehcache.Cache<String,
ACacheModel> static void
init()
static <T extends de.xima.cmn.dao.interfaces.IEntity<?>>
StringCacheModelreadCachedStringData
(T entity) Determine aStringCacheModel
from the cachestatic void
reinit()
Reinitialize cache after configuration changestatic void
shutdown()
Removes the cache instanceMethods inherited from class de.xima.fc.api.cache.AGenericDataCache
cacheData, readCachedData, readCachedData
-
Field Details
-
CACHE_NAME
- See Also:
-
-
Constructor Details
-
GenericDataCache
public GenericDataCache()
-
-
Method Details
-
getCachedI18nValues
-
getCachedI18nValues
public static com.alibaba.fastjson.JSONObject getCachedI18nValues(UserContext uc, Textbaustein template) throws com.alibaba.fastjson.JSONException - Throws:
com.alibaba.fastjson.JSONException
-
readCachedStringData
public static <T extends de.xima.cmn.dao.interfaces.IEntity<?>> StringCacheModel readCachedStringData(T entity) Determine aStringCacheModel
from the cache- Parameters:
entity
- the entity to read the cache for- Returns:
StringCacheModel
-
cacheStringData
public static <T extends de.xima.cmn.dao.interfaces.ILockableEntity<?>> void cacheStringData(UserContext uc, T entity, String dataToCache) Writes the given data into the cache under the locking version of the given entity.- Parameters:
uc
- the user contextentity
- the entity with the locking version for the cache key generationdataToCache
- the data to write into the cache
-
getEntryKey
-
getInstance
-
shutdown
public static void shutdown()Removes the cache instance -
init
public static void init() -
reinit
public static void reinit()Reinitialize cache after configuration change
-