java.lang.Object
org.rrd4j.data.Source
Abstract base class for RRD data sources.
Provides common functionality for storing and managing time-series data with timestamps and values.
Provides common functionality for storing and managing time-series data with timestamps and values.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringName other definitions use to refer to this source.protected long[]timestamps corresponding to data valuesprotected double[]data valuesConstructor Summary
Method Summary
All MethodsModifier and TypeMethodDescription(package private) StringgetName()Returns the source name.(package private) long[]The time, in seconds since the epoch, of each recorded value.(package private) double[]Returns the data values.(package private) voidsetTimestamps(long[] timestamps) Sets the timestamps.(package private) voidsetValues(double[] values) Sets the data values.
Field Details
name
Name other definitions use to refer to this source.values
protected double[] valuesdata valuestimestamps
protected long[] timestampstimestamps corresponding to data values
Constructor Details
Source
Method Details
getName
setValues
void setValues(double[] values) Sets the data values.- Parameters:
values- the data values array
setTimestamps
void setTimestamps(long[] timestamps) Sets the timestamps.- Parameters:
timestamps- the timestamps array
getValues
double[] getValues()Returns the data values.- Returns:
- the values array
getTimestamps
long[] getTimestamps()The time, in seconds since the epoch, of each recorded value.- Returns:
- the array of timestamps, index-aligned with
getValues()