@ExperimentalApi @Immutable public abstract class TimeSeries extends Object
Metric.| Modifier and Type | Method and Description |
|---|---|
static TimeSeries |
create(List<LabelValue> labelValues)
Creates a
TimeSeries with empty(or no) points. |
static TimeSeries |
create(List<LabelValue> labelValues,
List<Point> points,
Timestamp startTimestamp)
Creates a
TimeSeries. |
static TimeSeries |
createWithOnePoint(List<LabelValue> labelValues,
Point point,
Timestamp startTimestamp)
Creates a
TimeSeries. |
abstract List<LabelValue> |
getLabelValues()
Returns the set of
LabelValues that uniquely identify this TimeSeries. |
abstract List<Point> |
getPoints()
Returns the data
Points of this TimeSeries. |
abstract Timestamp |
getStartTimestamp()
Returns the start
Timestamp of this TimeSeries if the Points are
cumulative, or null if the Points are gauge. |
TimeSeries |
setPoint(Point point)
Sets the
Point of the TimeSeries. |
public static TimeSeries create(List<LabelValue> labelValues, List<Point> points, @Nullable Timestamp startTimestamp)
TimeSeries.labelValues - the LabelValues that uniquely identify this TimeSeries.points - the data Points of this TimeSeries.startTimestamp - the start Timestamp of this TimeSeries. Must be non-null
for cumulative Points.TimeSeries.public static TimeSeries create(List<LabelValue> labelValues)
TimeSeries with empty(or no) points.labelValues - the LabelValues that uniquely identify this TimeSeries.TimeSeries.public static TimeSeries createWithOnePoint(List<LabelValue> labelValues, Point point, @Nullable Timestamp startTimestamp)
TimeSeries.labelValues - the LabelValues that uniquely identify this TimeSeries.point - the single data Point of this TimeSeries.startTimestamp - the start Timestamp of this TimeSeries. Must be non-null
for cumulative Points.TimeSeries.public TimeSeries setPoint(Point point)
Point of the TimeSeries.point - the single data Point of this TimeSeries.TimeSeries.public abstract List<LabelValue> getLabelValues()
LabelValues that uniquely identify this TimeSeries.
Apply to all Points.
The order of LabelValues must match that of LabelKeys in the MetricDescriptor.
LabelValues.public abstract List<Point> getPoints()
Points of this TimeSeries.Points.