@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
LabelValue s that uniquely identify this TimeSeries . |
abstract List<Point> |
getPoints()
Returns the data
Point s of this TimeSeries . |
abstract Timestamp |
getStartTimestamp()
Returns the start
Timestamp of this TimeSeries if the Point s are
cumulative, or null if the Point s 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 LabelValue
s that uniquely identify this TimeSeries
.points
- the data Point
s of this TimeSeries
.startTimestamp
- the start Timestamp
of this TimeSeries
. Must be non-null
for cumulative Point
s.TimeSeries
.public static TimeSeries create(List<LabelValue> labelValues)
TimeSeries
with empty(or no) points.labelValues
- the LabelValue
s that uniquely identify this TimeSeries
.TimeSeries
.public static TimeSeries createWithOnePoint(List<LabelValue> labelValues, Point point, @Nullable Timestamp startTimestamp)
TimeSeries
.labelValues
- the LabelValue
s 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 Point
s.TimeSeries
.public TimeSeries setPoint(Point point)
Point
of the TimeSeries
.point
- the single data Point
of this TimeSeries
.TimeSeries
.public abstract List<LabelValue> getLabelValues()
LabelValue
s that uniquely identify this TimeSeries
.
Apply to all Point
s.
The order of LabelValue
s must match that of LabelKey
s in the MetricDescriptor
.
LabelValue
s.public abstract List<Point> getPoints()
Point
s of this TimeSeries
.Point
s.