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

EJBPoolStatsImpl

public class EJBPoolStatsImpl extends StatsImpl implements com.sun.enterprise.admin.monitor.stats.EJBPoolStats
A Class for providing pool stats for EJB Container Used by both Entity and Stateless Container
author
Mahesh Kannan

Fields Summary
private com.sun.ejb.spi.stats.EJBPoolStatsProvider
delegate
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
jmsStat
private com.sun.enterprise.admin.monitor.stats.MutableBoundedRangeStatisticImpl
beansInPoolStat
private com.sun.enterprise.admin.monitor.stats.MutableBoundedRangeStatisticImpl
threadStat
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
createdStat
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl
destroyedStat
Constructors Summary
public EJBPoolStatsImpl(com.sun.ejb.spi.stats.EJBPoolStatsProvider delegate)

	this.delegate = delegate;

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

	jmsStat.setCount(delegate.getJmsMaxMessagesLoad());
	return (CountStatistic) jmsStat.modifiableView();
    
public javax.management.j2ee.statistics.BoundedRangeStatisticgetNumBeansInPool()

	beansInPoolStat.setCount(delegate.getNumBeansInPool());
	return (BoundedRangeStatistic) beansInPoolStat.modifiableView();
    
public javax.management.j2ee.statistics.BoundedRangeStatisticgetNumThreadsWaiting()

	threadStat.setCount(delegate.getNumThreadsWaiting());
	return (BoundedRangeStatistic) threadStat.modifiableView();
    
public javax.management.j2ee.statistics.CountStatisticgetTotalBeansCreated()

	createdStat.setCount(delegate.getTotalBeansCreated());
	return (CountStatistic) createdStat.modifiableView();
    
public javax.management.j2ee.statistics.CountStatisticgetTotalBeansDestroyed()

	destroyedStat.setCount(delegate.getTotalBeansDestroyed());
	return (CountStatistic) destroyedStat.modifiableView();
    
protected voidinitialize()

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

	jmsStat = new MutableCountStatisticImpl(
		new CountStatisticImpl("JmsMaxMessagesLoad"));
	beansInPoolStat = new MutableBoundedRangeStatisticImpl(
		new BoundedRangeStatisticImpl("NumBeansInPool",
		    "Count", 0, delegate.getMaxPoolSize(),
		    delegate.getSteadyPoolSize()));
	threadStat = new MutableBoundedRangeStatisticImpl(
		new BoundedRangeStatisticImpl("NumThreadsWaiting"));
	createdStat = new MutableCountStatisticImpl(
		new CountStatisticImpl("TotalBeansCreated"));
	destroyedStat = new MutableCountStatisticImpl(
		new CountStatisticImpl("TotalBeansDestroyed"));