FileDocCategorySizeDatePackage
EJBCacheStatsImpl.javaAPI DocGlassfish v2 API5794Fri May 04 22:32:56 BST 2007com.sun.ejb.base.stats

EJBCacheStatsImpl

public class EJBCacheStatsImpl extends StatsImpl implements com.sun.enterprise.admin.monitor.stats.EJBCacheStats
A Class for providing stats for EJB Caches. Used by both Entity and Stateful Containers
author
Mahesh Kannan

Fields Summary
private com.sun.ejb.spi.stats.EJBCacheStatsProvider
delegate
private com.sun.enterprise.admin.monitor.stats.MutableBoundedRangeStatisticImpl
cacheHits
private com.sun.enterprise.admin.monitor.stats.MutableBoundedRangeStatisticImpl
cacheMisses
private com.sun.enterprise.admin.monitor.stats.MutableBoundedRangeStatisticImpl
numBeans
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
expiredStat
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
passivationErrors
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
passivations
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
passivationSuccess
Constructors Summary
public EJBCacheStatsImpl(com.sun.ejb.spi.stats.EJBCacheStatsProvider delegate)

	this.delegate = delegate;

	initialize();
    
Methods Summary
public javax.management.j2ee.statistics.BoundedRangeStatisticgetCacheHits()

	cacheHits.setCount(delegate.getCacheHits());
	return (BoundedRangeStatistic) cacheHits.modifiableView();
    
public javax.management.j2ee.statistics.BoundedRangeStatisticgetCacheMisses()

	cacheMisses.setCount(delegate.getCacheMisses());
	return (BoundedRangeStatistic) cacheMisses.modifiableView();
    
public javax.management.j2ee.statistics.BoundedRangeStatisticgetNumBeansInCache()

	numBeans.setCount(delegate.getNumBeansInCache());
	return (BoundedRangeStatistic) numBeans.modifiableView();
    
public javax.management.j2ee.statistics.CountStatisticgetNumExpiredSessionsRemoved()

	expiredStat.setCount(delegate.getNumExpiredSessionsRemoved());
	return (CountStatistic) expiredStat.modifiableView();
    
public javax.management.j2ee.statistics.CountStatisticgetNumPassivationErrors()

	passivationErrors.setCount(delegate.getNumPassivationErrors());
	return (CountStatistic) passivationErrors.modifiableView();
    
public javax.management.j2ee.statistics.CountStatisticgetNumPassivationSuccess()

	passivationSuccess.setCount(delegate.getNumPassivationSuccess());
	return (CountStatistic) passivationSuccess.modifiableView();
    
public javax.management.j2ee.statistics.CountStatisticgetNumPassivations()

	passivations.setCount(delegate.getNumPassivations());
	return (CountStatistic) passivations.modifiableView();
    
protected voidinitialize()

	super.initialize("com.sun.enterprise.admin.monitor.stats.EJBCacheStats");

	cacheHits = new MutableBoundedRangeStatisticImpl(
		new BoundedRangeStatisticImpl("CacheHits"));
	cacheMisses = new MutableBoundedRangeStatisticImpl(
		new BoundedRangeStatisticImpl("CacheMisses"));
	numBeans = new MutableBoundedRangeStatisticImpl(
		new BoundedRangeStatisticImpl("NumBeansInCache",
		   "Count", 0, delegate.getMaxCacheSize(), 0));
	expiredStat = new MutableCountStatisticImpl(
		new CountStatisticImpl("NumExpiredSessionsRemoved"));
	passivationErrors = new MutableCountStatisticImpl(
		new CountStatisticImpl("NumPassivationErrors"));
	passivations = new MutableCountStatisticImpl(
		new CountStatisticImpl("NumPassivations"));
	passivationSuccess = new MutableCountStatisticImpl(
		new CountStatisticImpl("NumPassivationSuccess"));