public abstract class MemoryCachePoolMixin extends Object implements MemoryCachePoolService
ServiceActivation.ServiceActivator| Constructor and Description |
|---|
MemoryCachePoolMixin() |
| 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.
|
MemoryCacheImpl<?> |
singleCache()
Get the single Cache of this CachePool.
|
public <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.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 MemoryCacheImpl<?> singleCache()
MemoryCachePoolServicesingleCache in interface MemoryCachePoolService