Package io.opencensus.metrics
Class DoubleGauge.NoopDoubleGauge
- java.lang.Object
-
- io.opencensus.metrics.DoubleGauge
-
- io.opencensus.metrics.DoubleGauge.NoopDoubleGauge
-
- Enclosing class:
- DoubleGauge
private static final class DoubleGauge.NoopDoubleGauge extends DoubleGauge
No-op implementations of DoubleGauge class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classDoubleGauge.NoopDoubleGauge.NoopDoublePointNo-op implementations of DoublePoint class.-
Nested classes/interfaces inherited from class io.opencensus.metrics.DoubleGauge
DoubleGauge.DoublePoint
-
-
Field Summary
Fields Modifier and Type Field Description private intlabelKeysSize
-
Constructor Summary
Constructors Constructor Description NoopDoubleGauge(java.lang.String name, java.lang.String description, java.lang.String unit, java.util.List<LabelKey> labelKeys)Creates a newNoopDoublePoint.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes allTimeSeriesfrom the gauge metric.(package private) static DoubleGauge.NoopDoubleGaugecreate(java.lang.String name, java.lang.String description, java.lang.String unit, java.util.List<LabelKey> labelKeys)DoubleGauge.NoopDoubleGauge.NoopDoublePointgetDefaultTimeSeries()Returns aDoublePointfor a gauge with all labels not set, or default labels.DoubleGauge.NoopDoubleGauge.NoopDoublePointgetOrCreateTimeSeries(java.util.List<LabelValue> labelValues)Creates aTimeSeriesand returns aDoublePointif the specifiedlabelValuesis not already associated with this gauge, else returns an existingDoublePoint.voidremoveTimeSeries(java.util.List<LabelValue> labelValues)Removes theTimeSeriesfrom the gauge metric, if it is present.-
Methods inherited from class io.opencensus.metrics.DoubleGauge
newNoopDoubleGauge
-
-
-
-
Constructor Detail
-
NoopDoubleGauge
NoopDoubleGauge(java.lang.String name, java.lang.String description, java.lang.String unit, java.util.List<LabelKey> labelKeys)Creates a newNoopDoublePoint.
-
-
Method Detail
-
create
static DoubleGauge.NoopDoubleGauge create(java.lang.String name, java.lang.String description, java.lang.String unit, java.util.List<LabelKey> labelKeys)
-
getOrCreateTimeSeries
public DoubleGauge.NoopDoubleGauge.NoopDoublePoint getOrCreateTimeSeries(java.util.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(java.lang.String, java.lang.String, java.lang.String, java.util.List<io.opencensus.metrics.LabelKey>).- Returns:
- a
DoublePointthe value of single gauge.
-
getDefaultTimeSeries
public DoubleGauge.NoopDoubleGauge.NoopDoublePoint 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
public void removeTimeSeries(java.util.List<LabelValue> labelValues)
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
-
-