Interface CacheManager
-
- All Known Implementing Classes:
DefaultCacheManager
public interface CacheManagerCache manager which is used as the top level interaction when dealing with cached objects
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancacheExists(String cacheName)Checks if cache name existsvoidclearAllEntries()Clears all available caches.CachegetCache(String cacheName)Get cache object by name.Collection<String>getCacheNames()Returns a collection of all cache namesCollection<Cache>getCaches()Returns a collection of all cachesCacheputCache(String cacheName, int maximumSize)Puts cache object into store
-
-
-
Method Detail
-
clearAllEntries
void clearAllEntries()
Clears all available caches. Should not be used in production. Can be applied on "soft" application restart.
-
getCacheNames
Collection<String> getCacheNames()
Returns a collection of all cache names- Returns:
- Collection of all cache names
-
getCaches
Collection<Cache> getCaches()
Returns a collection of all caches- Returns:
- collection of all caches
-
getCache
Cache getCache(String cacheName) throws MappingException
Get cache object by name.- Parameters:
cacheName- unique cache name- Returns:
- Cache object found
- Throws:
MappingException- exception is thrown if no cache found
-
putCache
Cache putCache(String cacheName, int maximumSize) throws MappingException
Puts cache object into store- Parameters:
cacheName- cache name to storemaximumSize- maximum number of objects to store in cache- Returns:
- Cache object created
- Throws:
MappingException- exception is thrown if cache already exists
-
cacheExists
boolean cacheExists(String cacheName)
Checks if cache name exists- Parameters:
cacheName- cache name to find- Returns:
- true if found, false if doesn't exist
-
-