T - Which must be Double, Long, or String.public class HistoryInstrument<T> extends Object implements IInstrument<T>
History.| Modifier and Type | Field and Description |
|---|---|
History<T> |
days |
History<T> |
hours |
protected static org.apache.log4j.Logger |
log |
History<T> |
minutes |
| Constructor and Description |
|---|
HistoryInstrument(History<T> minutes) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long timestamp,
T value)
Adds the sample to the history.
|
History<T> |
getHistory()
Return the history data.
|
History<T> |
getHistory(PeriodEnum basePeriod)
Return the
History for the specified base period. |
T |
getValue()
Return the last value.
|
long |
lastModified()
Return the timestamp associated with the last value.
|
void |
setValue(T value,
long timestamp)
Adds the sample to the history.
|
String |
toString() |
public History<T> getHistory(PeriodEnum basePeriod)
History for the specified base period.basePeriod - The base period.public T getValue()
getValue in interface IInstrument<T>public long lastModified()
lastModified in interface IInstrument<T>public void add(long timestamp,
T value)
timestamp - The timestamp.value - The value of the counter as of that timestamp.public void setValue(T value, long timestamp)
setValue in interface IInstrument<T>value - The sampled value.timestamp - The timestamp for that sample.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.