Interface JCSJMXBean

All Known Implementing Classes:
JCSAdminBean

@MXBean public interface JCSJMXBean
A MXBean to expose the JCS statistics to JMX
  • Method Details

    • buildElementInfo

      Builds up info about each element in a region.

      Parameters:
      cacheName -
      Returns:
      List of CacheElementInfo objects
      Throws:
      IOException
    • buildCacheInfo

      Builds up data on every region.

      TODO we need a most light weight method that does not count bytes. The byte counting can really swamp a server.

      Returns:
      List of CacheRegionInfo objects
    • getByteCount

      long getByteCount(String cacheName)
      Tries to estimate how much data is in a region. This is expensive. If there are any non serializable objects in the region or an error occurs, suppresses exceptions and returns 0.

      Returns:
      long The size of the region in bytes.
    • clearAllRegions

      Clears all regions in the cache.

      If this class is running within a remote cache server, clears all regions via the RemoteCacheServer API, so that removes will be broadcast to client machines. Otherwise clears all regions in the cache directly via the usual cache API.

      Throws:
      IOException
    • clearRegion

      void clearRegion(String cacheName) throws IOException
      Clears a particular cache region.

      If this class is running within a remote cache server, clears the region via the RemoteCacheServer API, so that removes will be broadcast to client machines. Otherwise clears the region directly via the usual cache API.

      Throws:
      IOException
    • removeItem

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

      If this class is running within a remote cache server, removes the item via the RemoteCacheServer API, so that removes will be broadcast to client machines. Otherwise clears the region directly via the usual cache API.

      Parameters:
      cacheName -
      key -
      Throws:
      IOException