org.apache.cocoon.monitoring.cache
Class CacheMonitor

java.lang.Object
  extended by org.apache.cocoon.monitoring.cache.CacheMonitor

@ManagedResource
public class CacheMonitor
extends Object

JMX MBean to monitor caches.


Constructor Summary
CacheMonitor(Cache cache)
           
 
Method Summary
 void clear()
          Removes all cached data.
 String[] listKeys()
          List available cache keys
 boolean removeKey(String cacheKeyName)
          Remove specific key for cache
 String size()
          Returns size of this cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheMonitor

public CacheMonitor(Cache cache)
Method Detail

clear

@ManagedOperation(description="Removes all cached data.")
public final void clear()
Removes all cached data.


listKeys

@ManagedOperation(description="Removes all cached data.")
public final String[] listKeys()
List available cache keys

Returns:

removeKey

@ManagedOperation(description="Remove specific key for cache")
public final boolean removeKey(String cacheKeyName)
Remove specific key for cache

Parameters:
cacheKeyName - name of CacheKey with should be removed
Returns:

size

@ManagedOperation(description="Returns size of this cache")
public final String size()
Returns size of this cache

Returns:


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.