public interface StatisticsAwareCache
One cache class which generically handles all needed cache operations.
Modifier and Type | Method and Description |
---|---|
void |
clear(String... cacheNames)
Clears all values from the specified cache by name.
|
void |
evict(String cacheName,
Object key)
Evicts the value in the specified cache by name and key.
|
<T> T |
get(String cacheName,
Object key,
Class<T> valueClass)
Gets the value from the specified cache by name and key.
|
org.springframework.cache.Cache |
getCache(String cacheName)
Return the cache instance by the given cache name.
|
List<CacheStatistics> |
getCacheStatistics()
Returns the
CacheStatistics of all currently used cache instances. |
void |
put(String cacheName,
Object key,
Object value)
Saves the value in the specified cache by name and key.
|
static final String EDORAS_GEAR_GLOBAL_ID_BY_WORK_OBJECT_ID_CACHE_NAME
static final String EDORAS_GEAR_WORK_OBJECT_ID_BY_GLOBAL_ID_CACHE_NAME
static final String EDORAS_GEAR_FORM_DEFINITIONS_BY_KEY_CACHE_NAME
static final String EDORAS_GEAR_ANY_WORK_OBJECT_DEFINITIONS_BY_ID_CACHE_NAME
static final String EDORAS_GEAR_ANY_WORK_OBJECT_DEFINITIONS_BY_EXTERNAL_ID_CACHE_NAME
static final String EDORAS_GEAR_CONTENT_METADATA_BY_CONTENT_REFERENCE_ID
static final String EDORAS_GEAR_CONTENT_VERSIONS_BY_CONTENT_REFERENCE_ID
static final String EDORAS_GEAR_CONTENT_REFERENCES_BY_CONTENT_SOURCE_ID
static final String EDORAS_ONE_SYSTEM_GROUPS_BY_TENANT_ID_CACHE_NAME
static final String EDORAS_ONE_TENANT_NAME_BY_ID_CACHE_NAME
static final String EDORAS_ONE_TENANT_ID_BY_NAME_CACHE_NAME
static final String EDORAS_ONE_LANGUAGES_BY_LOCALE_CACHE_NAME
static final String EDORAS_ONE_CONVERTED_DOCUMENTS_CACHE_NAME
static final String EDORAS_ONE_PREVIEWED_DOCUMENTS_CACHE_NAME
static final String EDORAS_ONE_DEFINITION_ID_BY_MODEL_ID_CACHE_NAME
static final String EDORAS_VIS_UTIL_CACHE_NAME
static final String EDORAS_VIS_PALETTE_CACHE_NAME
static final String[] ALL_DEFINITION_CACHES
List<CacheStatistics> getCacheStatistics()
Returns the CacheStatistics
of all currently used cache instances. If the configured Cache
does not implement the CacheStatistics
interface,
the statistics are not returned for this instance.
CacheStatistics
of all currently used cache instances.org.springframework.cache.Cache getCache(String cacheName)
Return the cache instance by the given cache name.
cacheName
- the cache name for which the cache is returned<T> T get(String cacheName, Object key, Class<T> valueClass)
Gets the value from the specified cache by name and key. The return value is casted to the specified value class.
T
- the class of the returned valuecacheName
- the name of the cache to get the value fromkey
- the key of the valuevalueClass
- the class of the returned valueIllegalArgumentException
- if the parameters are invalid or when the cache with the specified name is not presentClassCastException
- if the value from the cache is not derived from the provided value classvoid put(String cacheName, Object key, Object value)
Saves the value in the specified cache by name and key.
cacheName
- the name of the cache to save the value tokey
- the key of the valuevalue
- the value to be saved. Depending on the underlying cache implementation, the value can be null.IllegalArgumentException
- if the parameters are invalid or when the cache with the specified name is not presentvoid evict(String cacheName, Object key)
Evicts the value in the specified cache by name and key.
cacheName
- the name of the cache to evict the value fromkey
- the key of the valueIllegalArgumentException
- if the parameters are invalid or when the cache with the specified name is not presentvoid clear(String... cacheNames)
Clears all values from the specified cache by name.
cacheNames
- the names of the caches to evict the value fromIllegalArgumentException
- if the parameters are invalid or when the cache with the specified name is not presentCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.