public class MemcachePoolMixin extends Object implements MemcachePoolService
ServiceActivation.ServiceActivator
Constructor and Description |
---|
MemcachePoolMixin() |
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
ServiceActivation
activateService
in interface ServiceActivation
Exception
- if unable to activatepublic void passivateService() throws Exception
ServiceActivation
passivateService
in interface ServiceActivation
Exception
- if unable to passivatepublic <T> Cache<T> fetchCache(String cacheId, Class<T> valueType)
CachePool
fetchCache
in interface CachePool
T
- 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)
CachePool
returnCache
in interface CachePool
cache
- The cache to return to the pool.