Package lumis.portal.cache
Class CacheManager
- java.lang.Object
-
- lumis.portal.cache.CacheManager
-
- All Implemented Interfaces:
ICacheManager
public class CacheManager extends java.lang.Object implements ICacheManager
Cache framework manager implementation.- Since:
- 4.0.11
- Version:
- $Revision: 20509 $ $Date: 2017-09-11 16:18:14 -0300 (Mon, 11 Sep 2017) $
-
-
Constructor Summary
Constructors Constructor Description CacheManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCacheConfig(SessionConfig sessionConfig, ICacheConfig cacheConfig, ITransaction transaction)
Adds a cacheConfig to persistence.void
adjustCacheCapacity(java.lang.String cacheId)
Adjusts the cache capacity by adjusting it and sending a message to the cluster for it to be adjusted.ICacheConfig
createCacheConfig(java.lang.String id)
Creates anICacheConfig
transient instance.void
deleteCacheConfig(SessionConfig sessionConfig, ICacheConfig cacheConfig, ITransaction transaction)
Deletes a cacheConfig from persistence.int
getCacheCapacity(java.lang.String cacheId)
Returns the capacity to be used for the specified cache.ICacheConfig
getCacheConfig(SessionConfig sessionConfig, java.lang.String cacheConfigId, ITransaction transaction)
Returns a persistent cacheConfig instance.
-
-
-
Method Detail
-
adjustCacheCapacity
public void adjustCacheCapacity(java.lang.String cacheId)
Adjusts the cache capacity by adjusting it and sending a message to the cluster for it to be adjusted.- Parameters:
cacheId
- the cache id.newCapacity
- the new capacity.- Since:
- 4.0.11
-
getCacheCapacity
public int getCacheCapacity(java.lang.String cacheId)
Description copied from interface:ICacheManager
Returns the capacity to be used for the specified cache.- Specified by:
getCacheCapacity
in interfaceICacheManager
- Parameters:
cacheId
- the cache's identifier.- Returns:
- the capacity.
-
createCacheConfig
public ICacheConfig createCacheConfig(java.lang.String id) throws PortalException
Description copied from interface:ICacheManager
Creates anICacheConfig
transient instance.- Specified by:
createCacheConfig
in interfaceICacheManager
- Parameters:
id
- the id for the instance to be created.- Returns:
- the created instance.
- Throws:
PortalException
- See Also:
ICacheManager.addCacheConfig(SessionConfig, ICacheConfig, ITransaction)
-
addCacheConfig
public void addCacheConfig(SessionConfig sessionConfig, ICacheConfig cacheConfig, ITransaction transaction) throws PortalException
Description copied from interface:ICacheManager
Adds a cacheConfig to persistence.- Specified by:
addCacheConfig
in interfaceICacheManager
- Parameters:
sessionConfig
- the user session information.cacheConfig
- the transient cacheConfig instance to be persisted.transaction
- the transaction for persistence access.- Throws:
PortalException
-
getCacheConfig
public ICacheConfig getCacheConfig(SessionConfig sessionConfig, java.lang.String cacheConfigId, ITransaction transaction) throws PortalException
Description copied from interface:ICacheManager
Returns a persistent cacheConfig instance.- Specified by:
getCacheConfig
in interfaceICacheManager
- Parameters:
sessionConfig
- the user session information.cacheConfigId
- the cacheConfig's identifier.transaction
- the transaction for persistence access.- Returns:
- a persistent cacheConfig instance.
- Throws:
PortalObjectNotFoundException
- if no cacheConfig with such id was found.PortalException
-
deleteCacheConfig
public void deleteCacheConfig(SessionConfig sessionConfig, ICacheConfig cacheConfig, ITransaction transaction) throws PortalException
Description copied from interface:ICacheManager
Deletes a cacheConfig from persistence.- Specified by:
deleteCacheConfig
in interfaceICacheManager
- Parameters:
sessionConfig
- the user session information.cacheConfig
- the persistent cacheConfig instance to be deleted.transaction
- the transaction for persistence access.- Throws:
PortalException
-
-