public class CacheManagerEhcache extends Object implements CacheManager
| Constructor and Description |
|---|
CacheManagerEhcache(net.sf.ehcache.CacheManager cacheManager) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String cacheName,
Serializable key)
Retrieves cached object.
|
List |
getAllKeys(String cacheName)
Retrieve all keys from the cache.
|
void |
put(String cacheName,
Serializable key,
Serializable obj)
Saves object to the cache.
|
boolean |
remove(String cacheName,
Serializable key)
Removes cached object from the cache.
|
void |
removeAll(String cacheName)
Removes all the entries from the given cache.
|
public CacheManagerEhcache(net.sf.ehcache.CacheManager cacheManager)
public void put(String cacheName, Serializable key, Serializable obj) throws CacheManagerException
CacheManagerput in interface CacheManagercacheName - cache namekey - key of the objectobj - actual object to be cachedCacheManagerException - if any problems arise during the operationpublic Object get(String cacheName, Serializable key) throws CacheManagerException, NotInCacheException
CacheManagerget in interface CacheManagercacheName - cache namekey - key of the objectCacheManagerException - if any problems arise during the operationNotInCacheException - if the key does not existpublic boolean remove(String cacheName, Serializable key) throws CacheManagerException
CacheManagerremove in interface CacheManagercacheName - cache namekey - key of the objectCacheManagerException - if any problems arise during the operationpublic void removeAll(String cacheName) throws CacheManagerException
CacheManagerremoveAll in interface CacheManagercacheName - cache name.CacheManagerException - if any problems arise during the operationpublic List getAllKeys(String cacheName) throws CacheManagerException
CacheManagergetAllKeys in interface CacheManagercacheName - cache name.CacheManagerExceptionCopyright © 2016 Atlassian. All Rights Reserved.