站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 management API Documentation 英文版文档

TimeStatisticImpl (JBoss/Management API) - JBoss 4.0.1 sp1 management API Documentation 英文版文档


org.jboss.management.j2ee.statistics
Class TimeStatisticImpl

java.lang.Object
  extended byorg.jboss.management.j2ee.statistics.StatisticImpl
      extended byorg.jboss.management.j2ee.statistics.TimeStatisticImpl
All Implemented Interfaces:
Serializable, javax.management.j2ee.statistics.Statistic, javax.management.j2ee.statistics.TimeStatistic

public class TimeStatisticImpl
extends StatisticImpl
implements javax.management.j2ee.statistics.TimeStatistic

Time Statisitic Container for JBoss.

Version:
$Revision: 1.4 $
Author:
Marc Fleury, Andreas Schaefer
See Also:
Serialized Form

Field Summary
protected  long count
           
protected  long maxTime
           
protected  long minTime
           
protected  double requestRate
           
protected  long totalTime
           
 
Fields inherited from class org.jboss.management.j2ee.statistics.StatisticImpl
description, lastSampleTime, name, startTime, units
 
Constructor Summary
TimeStatisticImpl(String name, String units, String description)
          Create a TimeStatistic
 
Method Summary
 void add(long pTime)
          Adds a Statistic Information about the elapsed time an action observed by this instance took.
 long getCount()
          Number of times the operation was invoked since the beginning of this measurement.
 long getMaxTime()
          The maximum amount of time taken to complete one invocation of this operation since the beginning of this measurement.
 long getMinTime()
          The minimum amount of time taken to complete one invocation of this operation since the beginning of this measurement.
 double getRequestRate()
           
 long getTotalTime()
          This is the sum total of time taken to complete every invocation of this operation since the beginning of this measurement.
 void reset()
          Resets the statistics to the initial values
 void set(long count, long minTime, long maxTime, long totalTime)
          Set all TimeStatistic values.
 String toString()
           
 
Methods inherited from class org.jboss.management.j2ee.statistics.StatisticImpl
getDescription, getLastSampleTime, getName, getStartTime, getUnit, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.management.j2ee.statistics.Statistic
getDescription, getLastSampleTime, getName, getStartTime, getUnit
 

Field Detail

count

protected long count

minTime

protected long minTime

maxTime

protected long maxTime

totalTime

protected long totalTime

requestRate

protected double requestRate
Constructor Detail

TimeStatisticImpl

public TimeStatisticImpl(String name,
                         String units,
                         String description)
Create a TimeStatistic

Parameters:
name - the name of the state
units - the units of the stat
description - a description of the stat
Method Detail

getCount

public long getCount()
Description copied from interface: javax.management.j2ee.statistics.TimeStatistic
Number of times the operation was invoked since the beginning of this measurement.

Specified by:
getCount in interface javax.management.j2ee.statistics.TimeStatistic
Returns:
The number of times a time measurements was added

getMinTime

public long getMinTime()
Description copied from interface: javax.management.j2ee.statistics.TimeStatistic
The minimum amount of time taken to complete one invocation of this operation since the beginning of this measurement.

Specified by:
getMinTime in interface javax.management.j2ee.statistics.TimeStatistic
Returns:
The minimum time added since start of the measurements

getMaxTime

public long getMaxTime()
Description copied from interface: javax.management.j2ee.statistics.TimeStatistic
The maximum amount of time taken to complete one invocation of this operation since the beginning of this measurement.

Specified by:
getMaxTime in interface javax.management.j2ee.statistics.TimeStatistic
Returns:
The maximum time added since start of the measurements

getTotalTime

public long getTotalTime()
Description copied from interface: javax.management.j2ee.statistics.TimeStatistic
This is the sum total of time taken to complete every invocation of this operation since the beginning of this measurement. Dividing totalTime by count will give you the average execution time for this operation.

Specified by:
getTotalTime in interface javax.management.j2ee.statistics.TimeStatistic
Returns:
The sum of all the time added to the measurements since it started

getRequestRate

public double getRequestRate()
Returns:
The request rate which is the number of counts divided by the time elapsed since the time measurements started

toString

public String toString()
Overrides:
toString in class StatisticImpl
Returns:
Debug Information about this instance

add

public void add(long pTime)
Adds a Statistic Information about the elapsed time an action observed by this instance took.

Parameters:
pTime - Time elapsed to added to a statistics

reset

public void reset()
Resets the statistics to the initial values

Overrides:
reset in class StatisticImpl

set

public void set(long count,
                long minTime,
                long maxTime,
                long totalTime)
Set all TimeStatistic values.

Parameters:
count - the invocation count
minTime - the min time for an invocation
maxTime - the max time for an invocation
totalTime - the total time for all invocations


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.