org.mortbay.jetty.servlet.jsr77
Class TimeStatisticImpl

java.lang.Object
  extended by org.mortbay.jetty.servlet.jsr77.TimeStatisticImpl
All Implemented Interfaces:
javax.management.j2ee.statistics.Statistic, javax.management.j2ee.statistics.TimeStatistic

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

Author:
janb To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Constructor Summary
TimeStatisticImpl(ServletStatsImpl servletStats, String name, String description, String unit)
           
 
Method Summary
 void addSample(long sample, long time)
           
 long getCount()
          Return number of times statistic has been gathered.
 String getDescription()
          Human readable description of statistic
 long getLastSampleTime()
          Get the time of the last sample.
 long getMaxTime()
          Return max value of statistic.
 long getMinTime()
          Return min value of statistic.
 String getName()
          Return name of statistic
 long getStartTime()
          Get the time the statistic began to be gathered.
 long getTotalTime()
          Return total time of statistic
 String getUnit()
          Return units of statistic
 void setDescription(String s)
           
 void setName(String n)
           
 void setServletStats(ServletStatsImpl stats)
           
 void setStartTime()
           
 void setUnit(String u)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeStatisticImpl

public TimeStatisticImpl(ServletStatsImpl servletStats,
                         String name,
                         String description,
                         String unit)
Method Detail

getCount

public long getCount()
Return number of times statistic has been gathered.

Specified by:
getCount in interface javax.management.j2ee.statistics.TimeStatistic
See Also:
TimeStatistic.getCount()

getMaxTime

public long getMaxTime()
Return max value of statistic.

Specified by:
getMaxTime in interface javax.management.j2ee.statistics.TimeStatistic
See Also:
TimeStatistic.getMaxTime()

getMinTime

public long getMinTime()
Return min value of statistic.

Specified by:
getMinTime in interface javax.management.j2ee.statistics.TimeStatistic
See Also:
TimeStatistic.getMinTime()

getTotalTime

public long getTotalTime()
Return total time of statistic

Specified by:
getTotalTime in interface javax.management.j2ee.statistics.TimeStatistic
See Also:
TimeStatistic.getTotalTime()

getName

public String getName()
Return name of statistic

Specified by:
getName in interface javax.management.j2ee.statistics.Statistic
See Also:
Statistic.getName()

setName

public void setName(String n)

getUnit

public String getUnit()
Return units of statistic

Specified by:
getUnit in interface javax.management.j2ee.statistics.Statistic
See Also:
Statistic.getUnit()

setUnit

public void setUnit(String u)

getDescription

public String getDescription()
Human readable description of statistic

Specified by:
getDescription in interface javax.management.j2ee.statistics.Statistic
See Also:
Statistic.getDescription()

setDescription

public void setDescription(String s)

getStartTime

public long getStartTime()
Get the time the statistic began to be gathered. As milliseconds since the last epoch.

Specified by:
getStartTime in interface javax.management.j2ee.statistics.Statistic
See Also:
Statistic.getStartTime()

setStartTime

public void setStartTime()

getLastSampleTime

public long getLastSampleTime()
Get the time of the last sample. As milliseconds since the epoch.

Specified by:
getLastSampleTime in interface javax.management.j2ee.statistics.Statistic
See Also:
Statistic.getLastSampleTime()

setServletStats

public void setServletStats(ServletStatsImpl stats)

addSample

public void addSample(long sample,
                      long time)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.