public abstract class EhCachePoolMixin extends Object implements EhCachePoolService
ServiceActivation.ServiceActivator| Constructor and Description |
|---|
EhCachePoolMixin() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateService()
Called after ServiceComposite Activation.
|
<T> Cache<T> |
fetchCache(String cacheId,
Class<T> valueType)
Fetches a cache from the pool.
|
void |
passivateService()
Called before ServiceComposite Passivation.
|
void |
returnCache(Cache<?> cache)
Returns the cache back to the pool.
|
public void activateService()
throws Exception
ServiceActivationactivateService in interface ServiceActivationException - if unable to activatepublic void passivateService()
throws Exception
ServiceActivationpassivateService in interface ServiceActivationException - if unable to passivatepublic <T> Cache<T> fetchCache(String cacheId, Class<T> valueType)
CachePoolfetchCache in interface CachePoolT - Value typecacheId - The reference of the cache. If the same id is given as a previous fetch, the same cache will be
returned.valueType - Value typepublic void returnCache(Cache<?> cache)
CachePoolreturnCache in interface CachePoolcache - The cache to return to the pool.