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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
Constructor and Description |
---|
Sample(long pTimestamp,
java.lang.String pServiceName,
java.lang.String pPropertyName,
java.lang.Object pValue,
Sample pPreviousSample)
Constructs a new Sample
|
Modifier and Type | Method and Description |
---|---|
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
|
public Sample(long pTimestamp, java.lang.String pServiceName, java.lang.String pPropertyName, java.lang.Object pValue, Sample pPreviousSample)
public long getTimestamp()
public java.lang.String getServiceName()
public java.lang.String getPropertyName()
public java.lang.Object getValue()
public double getDoubleValue()
public double getDelta()
public long getDeltaTime()
public double getDeltaRate()
public java.lang.String toString()
toString
in class java.lang.Object