public interface TimeStampedMetric
Metric
with associated time stamp management.Modifier and Type | Method and Description |
---|---|
DataPoint |
extractDataPoint()
Extract a
DataPoint from this object. |
MetricDescriptor |
getDescriptor()
Gets the
MetricDescriptor that describes this TimeStampedMetric object. |
long |
getMsSpanned()
Determines the number of milliseconds spanned between the latest (update)
time stamp and the oldest (previous) time stamp, accounting for roll-over
of the time stamp.
|
long |
getPreviousTimeStamp()
Gets the previous time stamp.
|
String |
getUid()
Gets the UID.
|
long |
getUpdateTimeStamp()
Gets the update time stamp.
|
boolean |
isValid()
Indicates whether this
TimeStampedMetric 's current value is a
valid one. |
void |
reset()
Prepares this
TimeStampedMetric for use in a new time period. |
void |
setPreviousTimeStamp(long time)
Sets the previous time stamp.
|
void |
setUid(String uid)
Sets the UID of this object.
|
void |
setUpdateTimeStamp(long time)
Sets the update time stamp.
|
void |
updateTimeStamp()
Convenience method that sets the update time stamp to the current time.
|
DataPoint extractDataPoint()
DataPoint
from this object.TimeStampedMetric
represented
as a DataPoint
MetricDescriptor getDescriptor()
MetricDescriptor
that describes this TimeStampedMetric
object.MetricDescriptor
that describes this TimeStampedMetric
long getPreviousTimeStamp()
long getMsSpanned()
String getUid()
long getUpdateTimeStamp()
boolean isValid()
TimeStampedMetric
's current value is a
valid one. For example, it could be a non-numeric value like Double.NaN,
depending upon type and state of the TimeStampedMetric
.true
if valid, false
otherwisevoid reset()
TimeStampedMetric
for use in a new time period.void setPreviousTimeStamp(long time)
time
- previous time stampvoid setUid(String uid)
uid
- new UID for this objectvoid setUpdateTimeStamp(long time)
time
- update time stampvoid updateTimeStamp()
Copyright © 2015. All Rights Reserved.