|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.wanghy.cache.provider.AbstractCacheProviderFacadeImpl org.wanghy.cache.provider.ehcache.EhcacheFacade
Delegates the caching functionality to EHCache.
Field Summary | |
private CacheManager |
cacheManager
EHCache cache manager. |
private static Log |
logger
Message logger. |
Fields inherited from class org.wanghy.cache.provider.AbstractCacheProviderFacadeImpl |
|
Constructor Summary | |
EhcacheFacade()
Constructor. |
Method Summary | |
protected AbstractCacheProfileEditor |
getCacheProfileEditor()
Returns a property editor for . |
protected CacheProfileValidator |
getCacheProfileValidator()
Returns a validator for the properties of cache profiles. |
protected void |
onFlushCache(CacheProfile cacheProfile)
Flushes the caches specified in the given profile. |
protected Object |
onGetFromCache(Serializable cacheKey,
CacheProfile cacheProfile)
Retrieves an entry from the cache. |
protected void |
onPutInCache(Serializable cacheKey,
CacheProfile cacheProfile,
Object objectToCache)
Stores an object in the cache. |
void |
removeFromCache(Serializable cacheKey,
String cacheProfileId)
Removes an object from the cache. |
void |
setCacheManager(CacheManager cacheManager)
Setter for the field . |
protected void |
validateCacheManager()
Validates that is not
null
Verifies that the state of is
'active' (only if this facade is not configured to fail quietly in case of
an error when accessing the cache.)
|
Methods inherited from class org.wanghy.cache.provider.AbstractCacheProviderFacadeImpl |
afterPropertiesSet, cancelCacheUpdate, flushCache, getCacheProfile, getCacheProfiles, getFromCache, handleCacheAccessException, isCacheProfileMapValidated, isFailQuietlyEnabled, onCancelCacheUpdate, putInCache, setCacheProfiles, setCacheProfiles, setFailQuietlyEnabled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static Log logger
private CacheManager cacheManager
Constructor Detail |
public EhcacheFacade()
Method Detail |
protected AbstractCacheProfileEditor getCacheProfileEditor()
AbstractCacheProviderFacadeImpl
CacheProfile
.
getCacheProfileEditor
in class AbstractCacheProviderFacadeImpl
AbstractCacheProviderFacadeImpl.getCacheProfileEditor()
protected CacheProfileValidator getCacheProfileValidator()
AbstractCacheProviderFacadeImpl
getCacheProfileValidator
in class AbstractCacheProviderFacadeImpl
AbstractCacheProviderFacadeImpl.getCacheProfileValidator()
,
EhcacheCacheProfileValidator.validateCacheProfile(Object)
protected void onFlushCache(CacheProfile cacheProfile)
AbstractCacheProviderFacadeImpl
onFlushCache
in class AbstractCacheProviderFacadeImpl
cacheProfile
- the cache profile that specifies what and how to flush.AbstractCacheProviderFacadeImpl.onFlushCache(CacheProfile)
protected Object onGetFromCache(Serializable cacheKey, CacheProfile cacheProfile) throws EntryRetrievalException
AbstractCacheProviderFacadeImpl
onGetFromCache
in class AbstractCacheProviderFacadeImpl
cacheKey
- the key under which the entry is stored.cacheProfile
- the the cache profile that specifies how to retrieve an entry.
EntryRetrievalException
- if an unexpected error takes place when retrieving the entry from
the cache.AbstractCacheProviderFacadeImpl.onGetFromCache(Serializable,
CacheProfile)
protected void onPutInCache(Serializable cacheKey, CacheProfile cacheProfile, Object objectToCache)
AbstractCacheProviderFacadeImpl
onPutInCache
in class AbstractCacheProviderFacadeImpl
cacheKey
- the key used to store the object.cacheProfile
- the cache profile that specifies how to store an object in the
cache.objectToCache
- the object to store in the cache.AbstractCacheProviderFacadeImpl.onPutInCache(Serializable,
CacheProfile, Object)
public void removeFromCache(Serializable cacheKey, String cacheProfileId)
CacheProviderFacade
cacheKey
- the key under which the object is stored.cacheProfileId
- the id of the cache profile that specifies how to store an object.CacheProviderFacade.removeFromCache(Serializable,
String)
public void setCacheManager(CacheManager cacheManager)
cacheManager
.
cacheManager
- the new value to setprotected void validateCacheManager()
cacheManager
is not
null
cacheManager
is
'active' (only if this facade is not configured to fail quietly in case of
an error when accessing the cache.)
validateCacheManager
in class AbstractCacheProviderFacadeImpl
IllegalArgumentException
- if the Cache Manager is null
.
IllegalArgumentException
- if the status of the Cache Manager is not "Alive".AbstractCacheProviderFacadeImpl.isFailQuietlyEnabled()
,
AbstractCacheProviderFacadeImpl.validateCacheManager()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |