Fields Summary |
---|
private static final Logger | _logger |
private com.sun.enterprise.admin.monitor.stats.GenericStatsImpl | baseStatsImpl |
private MBeanServer | server |
private ObjectName | threadPoolName |
private com.sun.enterprise.admin.monitor.stats.StringStatistic | id |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | countThreadsIdle |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | countThreads |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | maxThreads |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | countQueued |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | peakQueued |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | maxQueued |
Methods Summary |
---|
public javax.management.j2ee.statistics.CountStatistic | getCountQueued()Gets the current number of requests waiting for a thread.
return null;
|
public javax.management.j2ee.statistics.CountStatistic | getCountThreads()Gets the current number of threads.
countThreads.setCount(
StatsUtil.getAggregateStatistic(server, threadPoolName,
"countThreadsStats"));
return (CountStatistic)countThreads.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getCountThreadsIdle()Gets the number of threads that are currently idle.
countThreadsIdle.setCount(
StatsUtil.getAggregateStatistic(server, threadPoolName,
"countThreadsIdleStats"));
return (CountStatistic)countThreadsIdle.unmodifiableView();
|
public com.sun.enterprise.admin.monitor.stats.StringStatistic | getId()Gets the ID of the thread pool.
return id;
|
public javax.management.j2ee.statistics.CountStatistic | getMaxQueued()Gets the maximum number of requests that may be queued up
return null;
|
public javax.management.j2ee.statistics.CountStatistic | getMaxThreads()Gets the maximum number of threads allowed in the thread pool.
maxThreads.setCount(StatsUtil.getAggregateStatistic(server,
threadPoolName,
"maxThreadsStats"));
return (CountStatistic)maxThreads.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getPeakQueued()Gets the largest number of requests that were ever queued up
simultaneously for the use of a thread since the server was started.
return null;
|
public javax.management.j2ee.statistics.Statistic | getStatistic(java.lang.String name)Queries for a statistic with the given name.
return baseStatsImpl.getStatistic(name);
|
public java.lang.String[] | getStatisticNames()Gets array of all statistic names exposed by this implementation of
return baseStatsImpl.getStatisticNames();
|
public javax.management.j2ee.statistics.Statistic[] | getStatistics()This method can be used to retrieve all the Statistics, exposed
by this implementation of Stats
return baseStatsImpl.getStatistics();
|
private void | initializeStatistics()
long startTime = System.currentTimeMillis();
id = new StringStatisticImpl("",
"id",
"String",
"ID of the thread pool",
startTime,
startTime);
CountStatistic c = new CountStatisticImpl("CountThreadsIdle");
countThreadsIdle = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("CountThreads");
countThreads = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("MaxThreads");
maxThreads = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("CountQueued");
countQueued = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("PeakQueued");
peakQueued = new MutableCountStatisticImpl(c);
c = new CountStatisticImpl("MaxQueued");
maxQueued = new MutableCountStatisticImpl(c);
|