Class ConcurrentCacheMBeanImpl

java.lang.Object
org.apache.derby.impl.services.cache.ConcurrentCacheMBeanImpl
All Implemented Interfaces:
CacheManagerMBean

final class ConcurrentCacheMBeanImpl extends Object implements CacheManagerMBean
This class provides monitoring capabilities for ConcurrentCache through Java Management Extension (JMX).
  • Field Details

  • Constructor Details

    • ConcurrentCacheMBeanImpl

      ConcurrentCacheMBeanImpl(ConcurrentCache cache)
  • Method Details

    • setCollectAccessCounts

      public void setCollectAccessCounts(boolean collect)
      Description copied from interface: CacheManagerMBean
      Enable or disable collection of cache access counts. That is, whether or not each hit, miss and eviction should be counted. Enabling it might impose a small overhead on cache accesses, and might reduce the system performance. Access counts are disabled by default.
      Specified by:
      setCollectAccessCounts in interface CacheManagerMBean
      Parameters:
      collect - true if access counts should be collected, or false otherwise
      See Also:
    • getCollectAccessCounts

      public boolean getCollectAccessCounts()
      Description copied from interface: CacheManagerMBean
      Check if collection of cache access counts is enabled.
      Specified by:
      getCollectAccessCounts in interface CacheManagerMBean
      Returns:
      true if access counts are enabled, false otherwise
      See Also:
    • getHitCount

      public long getHitCount()
      Description copied from interface: CacheManagerMBean
      Get the number of cache accesses where the requested object was already in the cache.
      Specified by:
      getHitCount in interface CacheManagerMBean
      Returns:
      the number of cache hits
    • getMissCount

      public long getMissCount()
      Description copied from interface: CacheManagerMBean
      Get the number of cache accesses where the requested object was not already in the cache.
      Specified by:
      getMissCount in interface CacheManagerMBean
      Returns:
      the number of cache misses
    • getEvictionCount

      public long getEvictionCount()
      Description copied from interface: CacheManagerMBean
      Get the number of cached objects that have been evicted from the cache in order to make room for other objects.
      Specified by:
      getEvictionCount in interface CacheManagerMBean
      Returns:
      the number of evicted objects
    • getMaxEntries

      public long getMaxEntries()
      Description copied from interface: CacheManagerMBean
      Get the maximum number of entries that could be held by this cache.
      Specified by:
      getMaxEntries in interface CacheManagerMBean
      Returns:
      the maximum number of entries in the cache
    • getAllocatedEntries

      public long getAllocatedEntries()
      Description copied from interface: CacheManagerMBean
      Get the number of entries currently allocated in the cache. This number includes entries for objects that have been removed from the cache, whose entries have not yet been reused for other objects.
      Specified by:
      getAllocatedEntries in interface CacheManagerMBean
      Returns:
      the number of entries in the cache
    • getUsedEntries

      public long getUsedEntries()
      Description copied from interface: CacheManagerMBean
      Get the number of objects that are currently in the cache.
      Specified by:
      getUsedEntries in interface CacheManagerMBean
      Returns:
      the number of objects in the cache
    • checkPermission

      private static void checkPermission()