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)
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.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 MemoryCacheImpl<?> singleCache()
MemoryCachePoolService
singleCache
in interface MemoryCachePoolService