org.jboss.management.j2ee.statistics
Class StatisticImpl

java.lang.Object
  extended byorg.jboss.management.j2ee.statistics.StatisticImpl
All Implemented Interfaces:
java.io.Serializable, Statistic (src)
Direct Known Subclasses:
BoundaryStatisticImpl (src) , BoundedRangeStatisticImpl (src) , CountStatisticImpl (src) , RangeStatisticImpl (src) , TimeStatisticImpl (src)

public abstract class StatisticImpl
extends java.lang.Object
implements Statistic (src) , java.io.Serializable

JBoss Implementation of the base Model for a Statistic Information

See Also:
Serialized Form

Field Summary
protected  java.lang.String description
           
protected  long lastSampleTime
           
protected  java.lang.String name
           
protected  long startTime
           
protected  java.lang.String units
           
 
Constructor Summary
StatisticImpl(java.lang.String name, java.lang.String units, java.lang.String description)
          Create a named Statistic.
 
Method Summary
 java.lang.String getDescription()
          A human-readable description of the Statistic.
 long getLastSampleTime()
          The time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
 java.lang.String getName()
          The name of this Statistic.
 long getStartTime()
          The time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
 java.lang.String getUnit()
          The unit of measurement for this Statistic.
 void reset()
          Reset the lastSampleTime and startTime to the current time
 void set()
          Update the lastSampleTime and startTime on first call
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

units

protected java.lang.String units

description

protected java.lang.String description

startTime

protected long startTime

lastSampleTime

protected long lastSampleTime
Constructor Detail

StatisticImpl

public StatisticImpl(java.lang.String name,
                     java.lang.String units,
                     java.lang.String description)
Create a named Statistic.

Parameters:
name - Name of the statistic
units - Unit description used in this statistic
description - Human description of the statistic
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Statistic (src)
The name of this Statistic.

Specified by:
getName in interface Statistic (src)

getUnit

public java.lang.String getUnit()
Description copied from interface: Statistic (src)
The unit of measurement for this Statistic. Valid values for TimeStatistic measurements are "HOUR", "MINUTE", "SECOND", "MILLISECOND", "MICROSECOND" and "NANOSECOND".

Specified by:
getUnit in interface Statistic (src)

getDescription

public java.lang.String getDescription()
Description copied from interface: Statistic (src)
A human-readable description of the Statistic.

Specified by:
getDescription in interface Statistic (src)

getStartTime

public long getStartTime()
Description copied from interface: Statistic (src)
The time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.

Specified by:
getStartTime in interface Statistic (src)

getLastSampleTime

public long getLastSampleTime()
Description copied from interface: Statistic (src)
The time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.

Specified by:
getLastSampleTime in interface Statistic (src)

reset

public void reset()
Reset the lastSampleTime and startTime to the current time


set

public void set()
Update the lastSampleTime and startTime on first call


toString

public java.lang.String toString()