Top Description Fields Constructors Methods
org.apache.derby.impl.services.cache

pack-priv final Class ConcurrentCacheMBeanImpl

extends Object
implements CacheManagerMBean
Class Inheritance
All Implemented Interfaces
org.apache.derby.mbeans.CacheManagerMBean
Imports
org.apache.derby.mbeans.CacheManagerMBean, org.apache.derby.shared.common.security.SystemPermission

This class provides monitoring capabilities for ConcurrentCache through Java Management Extension (JMX).

Field Summary

Modifier and TypeField and Description
private final ConcurrentCache

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static void
checkPermission()

This method used to do a permission check in a privileged block

public long
getAllocatedEntries()

Implements org.apache.derby.mbeans.CacheManagerMBean.getAllocatedEntries.

Get the number of entries currently allocated in the cache.
public boolean
getCollectAccessCounts()

Implements org.apache.derby.mbeans.CacheManagerMBean.getCollectAccessCounts.

Check if collection of cache access counts is enabled.
public long
getEvictionCount()

Implements org.apache.derby.mbeans.CacheManagerMBean.getEvictionCount.

Get the number of cached objects that have been evicted from the cache in order to make room for other objects.
public long
getHitCount()

Implements org.apache.derby.mbeans.CacheManagerMBean.getHitCount.

Get the number of cache accesses where the requested object was already in the cache.
public long
getMaxEntries()

Implements org.apache.derby.mbeans.CacheManagerMBean.getMaxEntries.

Get the maximum number of entries that could be held by this cache.
public long
getMissCount()

Implements org.apache.derby.mbeans.CacheManagerMBean.getMissCount.

Get the number of cache accesses where the requested object was not already in the cache.
public long
getUsedEntries()

Implements org.apache.derby.mbeans.CacheManagerMBean.getUsedEntries.

Get the number of objects that are currently in the cache.
public void
setCollectAccessCounts(boolean
true if access counts should be collected, or false otherwise
collect
)

Implements org.apache.derby.mbeans.CacheManagerMBean.setCollectAccessCounts.

Enable or disable collection of cache access counts.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheback to summary
private final ConcurrentCache cache

Constructor Detail

ConcurrentCacheMBeanImplback to summary
pack-priv ConcurrentCacheMBeanImpl(ConcurrentCache cache)

Method Detail

checkPermissionback to summary
private static void checkPermission()

This method used to do a permission check in a privileged block

getAllocatedEntriesback to summary
public long getAllocatedEntries()

Implements org.apache.derby.mbeans.CacheManagerMBean.getAllocatedEntries.

Doc from org.apache.derby.mbeans.CacheManagerMBean.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:long

the number of entries in the cache

Annotations
@Override
getCollectAccessCountsback to summary
public boolean getCollectAccessCounts()

Implements org.apache.derby.mbeans.CacheManagerMBean.getCollectAccessCounts.

Doc from org.apache.derby.mbeans.CacheManagerMBean.getCollectAccessCounts.

Check if collection of cache access counts is enabled.

Returns:boolean

true if access counts are enabled, false otherwise

Annotations
@Override
getEvictionCountback to summary
public long getEvictionCount()

Implements org.apache.derby.mbeans.CacheManagerMBean.getEvictionCount.

Doc from org.apache.derby.mbeans.CacheManagerMBean.getEvictionCount.

Get the number of cached objects that have been evicted from the cache in order to make room for other objects.

Returns:long

the number of evicted objects

Annotations
@Override
getHitCountback to summary
public long getHitCount()

Implements org.apache.derby.mbeans.CacheManagerMBean.getHitCount.

Doc from org.apache.derby.mbeans.CacheManagerMBean.getHitCount.

Get the number of cache accesses where the requested object was already in the cache.

Returns:long

the number of cache hits

Annotations
@Override
getMaxEntriesback to summary
public long getMaxEntries()

Implements org.apache.derby.mbeans.CacheManagerMBean.getMaxEntries.

Doc from org.apache.derby.mbeans.CacheManagerMBean.getMaxEntries.

Get the maximum number of entries that could be held by this cache.

Returns:long

the maximum number of entries in the cache

Annotations
@Override
getMissCountback to summary
public long getMissCount()

Implements org.apache.derby.mbeans.CacheManagerMBean.getMissCount.

Doc from org.apache.derby.mbeans.CacheManagerMBean.getMissCount.

Get the number of cache accesses where the requested object was not already in the cache.

Returns:long

the number of cache misses

Annotations
@Override
getUsedEntriesback to summary
public long getUsedEntries()

Implements org.apache.derby.mbeans.CacheManagerMBean.getUsedEntries.

Doc from org.apache.derby.mbeans.CacheManagerMBean.getUsedEntries.

Get the number of objects that are currently in the cache.

Returns:long

the number of objects in the cache

Annotations
@Override
setCollectAccessCountsback to summary
public void setCollectAccessCounts(boolean collect)

Implements org.apache.derby.mbeans.CacheManagerMBean.setCollectAccessCounts.

Doc from org.apache.derby.mbeans.CacheManagerMBean.setCollectAccessCounts.

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:boolean

true if access counts should be collected, or false otherwise

Annotations
@Override