-
public interface CacheManagerMBeanThis is an MBean that provides information about one of Derby's cache managers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetAllocatedEntries()Get the number of entries currently allocated in the cache.booleangetCollectAccessCounts()Check if collection of cache access counts is enabled.longgetEvictionCount()Get the number of cached objects that have been evicted from the cache in order to make room for other objects.longgetHitCount()Get the number of cache accesses where the requested object was already in the cache.longgetMaxEntries()Get the maximum number of entries that could be held by this cache.longgetMissCount()Get the number of cache accesses where the requested object was not already in the cache.longgetUsedEntries()Get the number of objects that are currently in the cache.voidsetCollectAccessCounts(boolean collect)Enable or disable collection of cache access counts.
-
-
-
Method Detail
-
setCollectAccessCounts
void setCollectAccessCounts(boolean collect)
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.- Parameters:
collect-trueif access counts should be collected, orfalseotherwise- See Also:
getCollectAccessCounts(),getHitCount(),getMissCount(),getEvictionCount()
-
getCollectAccessCounts
boolean getCollectAccessCounts()
Check if collection of cache access counts is enabled.- Returns:
trueif access counts are enabled,falseotherwise- See Also:
setCollectAccessCounts(boolean)
-
getHitCount
long getHitCount()
Get the number of cache accesses where the requested object was already in the cache.- Returns:
- the number of cache hits
-
getMissCount
long getMissCount()
Get the number of cache accesses where the requested object was not already in the cache.- Returns:
- the number of cache misses
-
getEvictionCount
long getEvictionCount()
Get the number of cached objects that have been evicted from the cache in order to make room for other objects.- Returns:
- the number of evicted objects
-
getMaxEntries
long getMaxEntries()
Get the maximum number of entries that could be held by this cache.- Returns:
- the maximum number of entries in the cache
-
getAllocatedEntries
long getAllocatedEntries()
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.- Returns:
- the number of entries in the cache
-
getUsedEntries
long getUsedEntries()
Get the number of objects that are currently in the cache.- Returns:
- the number of objects in the cache
-
-