org.jasig.portal.utils.cache
Class CacheManagementHelper
java.lang.Object
org.jasig.portal.utils.cache.CacheManagementHelper
public class CacheManagementHelper
- extends Object
This class exposes some limited functions around the provided
CacheManager.
- Author:
- Nicholas Blair, npblair@wisc.edu
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
CacheManagementHelper
public CacheManagementHelper()
setCacheManager
public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
- Parameters:
cacheManager - the cacheManager to set
getAllCacheStatistics
public Map<String,CacheManagementHelper.CacheStatistics> getAllCacheStatistics()
getCacheStatistics
public net.sf.ehcache.Statistics getCacheStatistics(String cacheName)
- Parameters:
cacheName -
- Returns:
- the
CacheManagementHelper.CacheStatistics for the specified cache; returns null of cache is not alive or doesn't exist - See Also:
Status.STATUS_ALIVE,
Cache.getStatus(),
Cache.getStatistics()
clearCache
public void clearCache(String cacheName)
- Call
Cache.removeAll() on the specified cache, if it
exists and is alive.
- Parameters:
cacheName - - See Also:
Status.STATUS_ALIVE,
Cache.getStatus()
clearAllCaches
public void clearAllCaches()
- Call
clearCache(String) on ALL caches.
Copyright © 2010 Jasig. All Rights Reserved.