org.apache.jcs.admin
Class JCSAdminBean

java.lang.Object
  extended byorg.apache.jcs.admin.JCSAdminBean

public class JCSAdminBean
extends java.lang.Object

A servlet which provides HTTP access to JCS. Allows a summary of regions to be viewed, and removeAll to be run on individual regions or all regions. Also provides the ability to remove items (any number of key arguments can be provided with action 'remove'). Should be initialized with a properties file that provides at least a classpath resource loader.


Constructor Summary
JCSAdminBean()
           
 
Method Summary
 java.util.LinkedList buildCacheInfo()
          Builds up data on every region.
 java.util.LinkedList buildElementInfo(java.lang.String cacheName)
          Builds up info about each element in a region.
 void clearAllRegions()
          Clears all regions in the cache.
 void clearRegion(java.lang.String cacheName)
          Clears a particular cache region.
 int getByteCount(CompositeCache cache)
          Tries to estimate how much data is in a region.
 void removeItem(java.lang.String cacheName, java.lang.String key)
          Removes a particular item from a particular region.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCSAdminBean

public JCSAdminBean()
Method Detail

buildElementInfo

public java.util.LinkedList buildElementInfo(java.lang.String cacheName)
                                      throws java.lang.Exception
Builds up info about each element in a region.

Parameters:
cacheName -
Returns:
Throws:
java.lang.Exception

buildCacheInfo

public java.util.LinkedList buildCacheInfo()
                                    throws java.lang.Exception
Builds up data on every region.

Returns:
list of CacheRegionInfo objects
Throws:
java.lang.Exception

getByteCount

public int getByteCount(CompositeCache cache)
                 throws java.lang.Exception
Tries to estimate how much data is in a region. This is expensive. If there are any non serializable objects in the region, the count will stop when it encouters the first one.

Parameters:
cache -
Returns:
Throws:
java.lang.Exception

clearAllRegions

public void clearAllRegions()
                     throws java.io.IOException
Clears all regions in the cache.

Throws:
java.io.IOException

clearRegion

public void clearRegion(java.lang.String cacheName)
                 throws java.io.IOException
Clears a particular cache region.

Parameters:
cacheName -
Throws:
java.io.IOException

removeItem

public void removeItem(java.lang.String cacheName,
                       java.lang.String key)
                throws java.io.IOException
Removes a particular item from a particular region.

Parameters:
cacheName -
key -
Throws:
java.io.IOException


Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.