lumis.portal.cache
Class CacheManager

Package class diagram package CacheManager
java.lang.Object
  extended by lumis.portal.cache.CacheManager
All Implemented Interfaces:
ICacheManager

public class CacheManager
extends Object
implements ICacheManager

Cache framework manager implementation.

Since:
4.0.11

Constructor Summary
CacheManager()
           
 
Method Summary
 void addCacheConfig(SessionConfig sessionConfig, ICacheConfig cacheConfig, ITransaction transaction)
          Adds a cacheConfig to persistence.
 void adjustCacheCapacity(String cacheId)
          Adjusts the cache capacity by adjusting it and sending a message to the cluster for it to be adjusted.
 ICacheConfig createCacheConfig(String id)
          Creates an ICacheConfig transient instance.
 void deleteCacheConfig(SessionConfig sessionConfig, ICacheConfig cacheConfig, ITransaction transaction)
          Deletes a cacheConfig from persistence.
 int getCacheCapacity(String cacheId)
          Returns the capacity to be used for the specified cache.
 ICacheConfig getCacheConfig(SessionConfig sessionConfig, String cacheConfigId, ITransaction transaction)
          Returns a persistent cacheConfig instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheManager

public CacheManager()
Method Detail

adjustCacheCapacity

public void adjustCacheCapacity(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(String cacheId)
Description copied from interface: ICacheManager
Returns the capacity to be used for the specified cache.

Specified by:
getCacheCapacity in interface ICacheManager
Parameters:
cacheId - the cache's identifier.
Returns:
the capacity.

createCacheConfig

public ICacheConfig createCacheConfig(String id)
                               throws PortalException
Description copied from interface: ICacheManager
Creates an ICacheConfig transient instance.

Specified by:
createCacheConfig in interface ICacheManager
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 interface ICacheManager
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,
                                   String cacheConfigId,
                                   ITransaction transaction)
                            throws PortalException
Description copied from interface: ICacheManager
Returns a persistent cacheConfig instance.

Specified by:
getCacheConfig in interface ICacheManager
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 interface ICacheManager
Parameters:
sessionConfig - the user session information.
cacheConfig - the persistent cacheConfig instance to be deleted.
transaction - the transaction for persistence access.
Throws:
PortalException


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.