Class LongCumulative.NoopLongCumulative
java.lang.Object
io.opencensus.metrics.LongCumulative
io.opencensus.metrics.LongCumulative.NoopLongCumulative
- Enclosing class:
LongCumulative
No-op implementations of LongCumulative class.
- Since:
- 0.21
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classNo-op implementations of LongPoint class.Nested classes/interfaces inherited from class LongCumulative
LongCumulative.LongPoint -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes allTimeSeriesfrom the cumulative metric.(package private) static LongCumulative.NoopLongCumulativeReturns aLongPointfor a cumulative with all labels not set, or default labels.getOrCreateTimeSeries(List<LabelValue> labelValues) Creates aTimeSeriesand returns aLongPointif the specifiedlabelValuesis not already associated with this cumulative, else returns an existingLongPoint.voidremoveTimeSeries(List<LabelValue> labelValues) Removes theTimeSeriesfrom the cumulative metric, if it is present.Methods inherited from class LongCumulative
newNoopLongCumulative
-
Field Details
-
labelKeysSize
private final int labelKeysSize
-
-
Constructor Details
-
NoopLongCumulative
-
-
Method Details
-
create
-
getOrCreateTimeSeries
public LongCumulative.NoopLongCumulative.NoopLongPoint getOrCreateTimeSeries(List<LabelValue> labelValues) Description copied from class:LongCumulativeCreates aTimeSeriesand returns aLongPointif the specifiedlabelValuesis not already associated with this cumulative, else returns an existingLongPoint.It is recommended to keep a reference to the LongPoint instead of always calling this method for manual operations.
- Specified by:
getOrCreateTimeSeriesin classLongCumulative- Parameters:
labelValues- the list of label values. The number of label values must be the same to that of the label keys passed toMetricRegistry.addLongCumulative(String, MetricOptions).- Returns:
- a
LongPointthe value of single cumulative.
-
getDefaultTimeSeries
Description copied from class:LongCumulativeReturns aLongPointfor a cumulative with all labels not set, or default labels.- Specified by:
getDefaultTimeSeriesin classLongCumulative- Returns:
- a
LongPointfor a cumulative with all labels not set, or default labels.
-
removeTimeSeries
Description copied from class:LongCumulativeRemoves theTimeSeriesfrom the cumulative metric, if it is present. i.e. references to previousLongPointobjects are invalid (not part of the metric).- Specified by:
removeTimeSeriesin classLongCumulative- Parameters:
labelValues- the list of label values.
-
clear
public void clear()Description copied from class:LongCumulativeRemoves allTimeSeriesfrom the cumulative metric. i.e. references to all previousLongPointobjects are invalid (not part of the metric).- Specified by:
clearin classLongCumulative
-