net.sf.xaj.core
Class EhcacheManagerBean

java.lang.Object
  extended by net.sf.xaj.core.EhcacheManagerBean

@ManagedResource(description="Ehcache manager",
                 objectName="xaj:name=ehcacheManager")
public class EhcacheManagerBean
extends java.lang.Object

Management bean for Ehcache, designed as a JMX bean.

The configurable properties of this class are:

cacheManager
The Ehcache CacheManager to manage.
dateFormat
A date format to apply to cache element dates.

Version:
$Revision: 45 $ $Date: 2007-10-07 19:40:28 +1300 (Sun, 07 Oct 2007) $
Author:
matt

Constructor Summary
EhcacheManagerBean()
          Default constructor.
EhcacheManagerBean(net.sf.ehcache.CacheManager cacheManager)
          Construct with a CacheManager.
 
Method Summary
 void clearCache(java.lang.String cacheName)
          Clear all items from a specific cache.
 net.sf.ehcache.CacheManager getCacheManager()
           
 java.lang.String[] getCacheNames()
          Get the list of configured caches.
 void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
           
 java.lang.String viewAllCacheInfo(boolean html)
          View information about all configured caches.
 java.lang.String viewCacheInfo(java.lang.String cacheName, boolean html)
          View information about an individual cache.
 java.lang.String viewCacheInfoDetailed(java.lang.String cacheName, boolean html)
          View detailed information about an individual cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhcacheManagerBean

public EhcacheManagerBean()
Default constructor.


EhcacheManagerBean

public EhcacheManagerBean(net.sf.ehcache.CacheManager cacheManager)
Construct with a CacheManager.

Parameters:
cacheManager - the CacheManager
Method Detail

getCacheNames

@ManagedAttribute(description="List of configured caches")
public java.lang.String[] getCacheNames()
Get the list of configured caches.

Returns:
list of cache names

viewCacheInfo

@ManagedOperation(description="View information about a specific cache")
@ManagedOperationParameters(value={,})
public java.lang.String viewCacheInfo(java.lang.String cacheName,
                                                                                  boolean html)
View information about an individual cache.

Parameters:
cacheName - the cache to inspect
html - if true return an HTML fragment, otherwise plain text
Returns:
information about the cache

viewCacheInfoDetailed

@ManagedOperation(description="View detailed information about a specific cache")
@ManagedOperationParameters(value={,})
public java.lang.String viewCacheInfoDetailed(java.lang.String cacheName,
                                                                                          boolean html)
View detailed information about an individual cache.

Parameters:
cacheName - the cache to inspect
html - if true return an HTML fragment, otherwise plain text
Returns:
information about the cache

clearCache

@ManagedOperation(description="Clear all items from a specific cache")
@ManagedOperationParameters(value=)
public void clearCache(java.lang.String cacheName)
Clear all items from a specific cache.

Parameters:
cacheName - the cache to clear

viewAllCacheInfo

@ManagedOperation(description="View information about all caches")
@ManagedOperationParameters(value=)
public java.lang.String viewAllCacheInfo(boolean html)
View information about all configured caches.

Parameters:
html - if true return an HTML fragment, otherwise plain text
Returns:
information about the caches

getCacheManager

public net.sf.ehcache.CacheManager getCacheManager()
Returns:
the cacheManager

setCacheManager

public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
Parameters:
cacheManager - the cacheManager to set