Fields Summary |
---|
private com.sun.enterprise.admin.monitor.stats.GenericStatsImpl | baseStatsImpl |
private static final String | STATS_INTERFACE_NAME |
private ThreadMXBean | bean |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | curThreadCpuTime |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | daemonThreadCount |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | peakThreadCount |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | threadCount |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatistic | totalStartedThreadCount |
final long | initTime |
static String | DELIMITER |
private static final com.sun.enterprise.util.i18n.StringManager | localStrMgr |
Methods Summary |
---|
public com.sun.enterprise.admin.monitor.stats.StringStatistic | getAllThreadIds()
long[] ids = bean.getAllThreadIds();
String idString = new String();
for(int i = 0; i < ids.length; i++)
{
idString = idString.concat(String.valueOf(ids[i]));
idString = idString.concat(DELIMITER);
}
return new StringStatisticImpl(idString,
localStrMgr.getString("monitor.stats.live_threads"),
localStrMgr.getString("monitor.stats.string_units"),
localStrMgr.getString("monitor.stats.live_threads_desc"),
initTime,
System.currentTimeMillis());
|
public javax.management.j2ee.statistics.CountStatistic | getCurrentThreadCPUTime()
curThreadCpuTime.setCount(bean.getCurrentThreadCpuTime());
return (CountStatistic) curThreadCpuTime.unmodifiableView ();
|
public javax.management.j2ee.statistics.CountStatistic | getDaemonThreadCount()
daemonThreadCount.setCount(bean.getDaemonThreadCount());
return (CountStatistic) daemonThreadCount.unmodifiableView();
|
public com.sun.enterprise.admin.monitor.stats.StringStatistic | getMonitorDeadlockedThreads()
long[] ids = bean.findMonitorDeadlockedThreads();
String idString = new String();
if(ids != null) {
for(int i = 0; i < ids.length; i++) {
idString = idString.concat(String.valueOf(ids[i]));
idString = idString.concat(DELIMITER);
}
}
if((ids == null) || (ids.length == 0)) {
idString = idString.concat(
localStrMgr.getString("monitor.stats.no_thread_deadlock"));
}
return new StringStatisticImpl(idString,
localStrMgr.getString("monitor.stats.dlocked_threads"),
localStrMgr.getString("monitor.stats.string_units"),
localStrMgr.getString("monitor.stats.dlocked_threads_desc"),
initTime,
System.currentTimeMillis());
|
public javax.management.j2ee.statistics.CountStatistic | getPeakThreadCount()
peakThreadCount.setCount(bean.getPeakThreadCount());
return (CountStatistic) peakThreadCount.unmodifiableView();
|
public javax.management.j2ee.statistics.Statistic | getStatistic(java.lang.String str)queries for a Statistic by name.
return baseStatsImpl.getStatistic(str);
|
public java.lang.String[] | getStatisticNames()returns an array of names of all the Statistics, that can be
retrieved from this implementation of Stats
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();
|
public javax.management.j2ee.statistics.CountStatistic | getThreadCount()
threadCount.setCount(bean.getThreadCount());
return (CountStatistic) threadCount.unmodifiableView();
|
public javax.management.j2ee.statistics.CountStatistic | getTotalStartedThreadCount()
totalStartedThreadCount.setCount(bean.getTotalStartedThreadCount());
return (CountStatistic) totalStartedThreadCount.unmodifiableView();
|
private void | initializeStatistics()
// Initialize the MutableCountStatistic for CurrentThreadCpuTime
CountStatistic c = new CountStatisticImpl(
localStrMgr.getString("thread_cpu_time"),
localStrMgr.getString("monitor.stats.nano_sec_units"),
localStrMgr.getString("thread_cpu_time_desc"));
curThreadCpuTime = new MutableCountStatisticImpl(c);
// Initialize the MutableCountStatistic for DaemonThreadCount
c= new CountStatisticImpl(
localStrMgr.getString("monitor.stats.daemon_thread_count"),
StatisticImpl.DEFAULT_UNIT,
localStrMgr.getString("monitor.stats.daemon_thread_count_desc"));
daemonThreadCount = new MutableCountStatisticImpl(c);
// Initialize the MutableCountStatistic for PeakThreadCount
c = new CountStatisticImpl(
localStrMgr.getString("monitor.stats.peak_thread_count"),
StatisticImpl.DEFAULT_UNIT,
localStrMgr.getString("monitor.stats.peak_thread_count_desc"));
peakThreadCount = new MutableCountStatisticImpl(c);
// Initialize the MutableCountStatistic for ThreadCount
c = new CountStatisticImpl(
localStrMgr.getString("monitor.stats.thread_count"),
StatisticImpl.DEFAULT_UNIT,
localStrMgr.getString("monitor.stats.thread_count_desc"));
threadCount = new MutableCountStatisticImpl(c);
// Initialize the MutableCountStatistic for TotalStartedThreadCount
c = new CountStatisticImpl(
localStrMgr.getString("monitor.stats.started_thread_count"),
StatisticImpl.DEFAULT_UNIT,
localStrMgr.getString("monitor.stats.started_thread_count_desc"));
totalStartedThreadCount = new MutableCountStatisticImpl(c);
|