com.ibm.websphere.externalnode
Class Statistic

java.lang.Object
  extended by com.ibm.websphere.externalnode.Statistic
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
AverageStatistic

public class Statistic
extends java.lang.Object
implements java.lang.Cloneable

The base class for all other statistic classes.

All fields are optional fields. Subclasses may dictate certain fields as mandatory.


Field Summary
protected  java.lang.String description
          Description of this statistic.
protected  long lastSampleTime
          Time the last measurement was taken.
protected  java.lang.String name
          Name of this statistic.
protected  float nodeSpeed
          The average system speed in MHz.
protected  int numberOfCPUs
          The number of Central Processing Units in the system.
protected  long startTime
          Time the first measurement was taken.
protected  java.lang.String unit
          The unit of measurement for this statistic.
 
Constructor Summary
Statistic()
          Constructs an empty Statistic object with default field values.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 java.lang.String getDescription()
          Returns a human-readable description of this statistic.
 long getLastSampleTime()
          Returns the time the last measurement was taken represented as a long.
 java.lang.String getName()
          Returns the name of this statistic.
 float getNodeSpeed()
          Returns the average system speed in MHz.
 int getNumberOfCPUs()
          Returns the number of Central Processing Units in the system.
 long getStartTime()
          Returns the time the first measurement was taken represented as a long.
 java.lang.String getUnit()
          Returns the unit of measurement for this statistic.
 void setDescription(java.lang.String description)
          Sets a human-readable description of this statistic.
 void setName(java.lang.String name)
          Sets the name of this statistic.
 void setNodeSpeed(float nodeSpeed)
          Sets the average system speed in MHz.
 void setNumberOfCPUs(int numberOfCPUs)
          Sets the number of Central Processing Units in the system.
 void setStartAndLastSampleTimes(long startTime, long lastSampleTime)
          Sets the start time and last sample time.
 void setUnit(java.lang.String unit)
          Sets the unit of measurement for this statistic.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Name of this statistic.


description

protected java.lang.String description
Description of this statistic.


unit

protected java.lang.String unit
The unit of measurement for this statistic.


startTime

protected long startTime
Time the first measurement was taken.


lastSampleTime

protected long lastSampleTime
Time the last measurement was taken.


nodeSpeed

protected float nodeSpeed
The average system speed in MHz.


numberOfCPUs

protected int numberOfCPUs
The number of Central Processing Units in the system.

Constructor Detail

Statistic

public Statistic()
Constructs an empty Statistic object with default field values.

Method Detail

getName

public java.lang.String getName()
Returns the name of this statistic. The name may be null if it is not specified.


setName

public void setName(java.lang.String name)
Sets the name of this statistic.

Parameters:
name - the name to set.

getUnit

public java.lang.String getUnit()
Returns the unit of measurement for this statistic. This may be null if the unit is not specified.


setUnit

public void setUnit(java.lang.String unit)
Sets the unit of measurement for this statistic.

Parameters:
unit - the unit to set.

getDescription

public java.lang.String getDescription()
Returns a human-readable description of this statistic. The description may be null if it is not set.


setDescription

public void setDescription(java.lang.String description)
Sets a human-readable description of this statistic.

Parameters:
description - the description to set.

getStartTime

public long getStartTime()
Returns the time the first measurement was taken represented as a long. This may be zero if the start time is not set.


getLastSampleTime

public long getLastSampleTime()
Returns the time the last measurement was taken represented as a long. This may be zero if the last sample time is not set.


setStartAndLastSampleTimes

public void setStartAndLastSampleTimes(long startTime,
                                       long lastSampleTime)
Sets the start time and last sample time.

Parameters:
startTime - the time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
lastSampleTime - the time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getNodeSpeed

public float getNodeSpeed()
Returns the average system speed in MHz. This may be zero if the system speed is not set.

Returns:
the system speed.

setNodeSpeed

public void setNodeSpeed(float nodeSpeed)
Sets the average system speed in MHz.

Parameters:
nodeSpeed - the speed to set.

getNumberOfCPUs

public int getNumberOfCPUs()
Returns the number of Central Processing Units in the system.

Returns:
the number of CPUs.

setNumberOfCPUs

public void setNumberOfCPUs(int numberOfCPUs)
Sets the number of Central Processing Units in the system.

Parameters:
numberOfCPUs - the number of CPUs to set.