Class DoubleGauge.NoopDoubleGauge
java.lang.Object
io.opencensus.metrics.DoubleGauge
io.opencensus.metrics.DoubleGauge.NoopDoubleGauge
- Enclosing class:
DoubleGauge
No-op implementations of DoubleGauge class.
- Since:
- 0.17
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classNo-op implementations of DoublePoint class.Nested classes/interfaces inherited from class DoubleGauge
DoubleGauge.DoublePoint -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes allTimeSeriesfrom the gauge metric.(package private) static DoubleGauge.NoopDoubleGaugeReturns aDoublePointfor a gauge with all labels not set, or default labels.getOrCreateTimeSeries(List<LabelValue> labelValues) Creates aTimeSeriesand returns aDoublePointif the specifiedlabelValuesis not already associated with this gauge, else returns an existingDoublePoint.voidremoveTimeSeries(List<LabelValue> labelValues) Removes theTimeSeriesfrom the gauge metric, if it is present.Methods inherited from class DoubleGauge
newNoopDoubleGauge
-
Field Details
-
labelKeysSize
private final int labelKeysSize
-
-
Constructor Details
-
NoopDoubleGauge
-
-
Method Details
-
create
-
getOrCreateTimeSeries
public DoubleGauge.NoopDoubleGauge.NoopDoublePoint getOrCreateTimeSeries(List<LabelValue> labelValues) Description copied from class:DoubleGaugeCreates aTimeSeriesand returns aDoublePointif the specifiedlabelValuesis not already associated with this gauge, else returns an existingDoublePoint.It is recommended to keep a reference to the DoublePoint instead of always calling this method for manual operations.
- Specified by:
getOrCreateTimeSeriesin classDoubleGauge- Parameters:
labelValues- the list of label values. The number of label values must be the same to that of the label keys passed toMetricRegistry.addDoubleGauge(String, String, String, List).- Returns:
- a
DoublePointthe value of single gauge.
-
getDefaultTimeSeries
Description copied from class:DoubleGaugeReturns aDoublePointfor a gauge with all labels not set, or default labels.- Specified by:
getDefaultTimeSeriesin classDoubleGauge- Returns:
- a
DoublePointfor a gauge with all labels not set, or default labels.
-
removeTimeSeries
Description copied from class:DoubleGaugeRemoves theTimeSeriesfrom the gauge metric, if it is present. i.e. references to previousDoublePointobjects are invalid (not part of the metric).- Specified by:
removeTimeSeriesin classDoubleGauge- Parameters:
labelValues- the list of label values.
-
clear
public void clear()Description copied from class:DoubleGaugeRemoves allTimeSeriesfrom the gauge metric. i.e. references to all previousDoublePointobjects are invalid (not part of the metric).- Specified by:
clearin classDoubleGauge
-