atg.service.statistics
Class Sample

java.lang.Object
  extended by atg.service.statistics.Sample

public class Sample
extends java.lang.Object

Represents a single sample taken of a service's property. This contains the time the sample was taken, name of the service, the name of the property, the value of the property, the change of the property since that last sample, and the rate of change of the property since the last sample.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
Sample(long pTimestamp, java.lang.String pServiceName, java.lang.String pPropertyName, java.lang.Object pValue, Sample pPreviousSample)
          Constructs a new Sample
 
Method Summary
 double getDelta()
          Returns the difference in value between this sample and the previous sample.
 double getDeltaRate()
          Returns the rate of change of the value between this sample and the previous sample, expressed as change/sec.
 long getDeltaTime()
          Returns the difference in time between this sample and the previous sample.
 double getDoubleValue()
          Returns the value of the property as a double, if the property is of a numeric type.
 java.lang.String getPropertyName()
          Returns the name of the property from which the sample was taken
 java.lang.String getServiceName()
          Returns the name of the service from which the sample was taken
 long getTimestamp()
          Returns the time at which the sample was taken
 java.lang.Object getValue()
          Returns the value of the property
 java.lang.String toString()
          Returns a String representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

Sample

public Sample(long pTimestamp,
              java.lang.String pServiceName,
              java.lang.String pPropertyName,
              java.lang.Object pValue,
              Sample pPreviousSample)
Constructs a new Sample

Method Detail

getTimestamp

public long getTimestamp()
Returns the time at which the sample was taken


getServiceName

public java.lang.String getServiceName()
Returns the name of the service from which the sample was taken


getPropertyName

public java.lang.String getPropertyName()
Returns the name of the property from which the sample was taken


getValue

public java.lang.Object getValue()
Returns the value of the property


getDoubleValue

public double getDoubleValue()
Returns the value of the property as a double, if the property is of a numeric type. Returns 0.0 otherwise.


getDelta

public double getDelta()
Returns the difference in value between this sample and the previous sample.


getDeltaTime

public long getDeltaTime()
Returns the difference in time between this sample and the previous sample.


getDeltaRate

public double getDeltaRate()
Returns the rate of change of the value between this sample and the previous sample, expressed as change/sec.


toString

public java.lang.String toString()
Returns a String representation of this object

Overrides:
toString in class java.lang.Object