Class DerivedLongGauge.NoopDerivedLongGauge
java.lang.Object
io.opencensus.metrics.DerivedLongGauge
io.opencensus.metrics.DerivedLongGauge.NoopDerivedLongGauge
- Enclosing class:
DerivedLongGauge
No-op implementations of DerivedLongGauge class.
- Since:
- 0.17
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes allTimeSeriesfrom the gauge metric.(package private) static DerivedLongGauge.NoopDerivedLongGauge<T> voidcreateTimeSeries(List<LabelValue> labelValues, T obj, ToLongFunction<T> function) Creates aTimeSeries.voidremoveTimeSeries(List<LabelValue> labelValues) Removes theTimeSeriesfrom the gauge metric, if it is present.Methods inherited from class DerivedLongGauge
newNoopDerivedLongGauge
-
Field Details
-
labelKeysSize
private final int labelKeysSize
-
-
Constructor Details
-
NoopDerivedLongGauge
-
-
Method Details
-
create
-
createTimeSeries
Description copied from class:DerivedLongGaugeCreates aTimeSeries. The value of a single point in the TimeSeries is observed from a callback function. This function is invoked whenever metrics are collected, meaning the reported value is up-to-date. It keeps aWeakReferenceto the object and it is the user's responsibility to manage the lifetime of the object.- Specified by:
createTimeSeriesin classDerivedLongGauge- Type Parameters:
T- the type of the object upon which the function derives a measurement.- Parameters:
labelValues- the list of label values.obj- the state object from which the function derives a measurement.function- the function to be called.
-
removeTimeSeries
Description copied from class:DerivedLongGaugeRemoves theTimeSeriesfrom the gauge metric, if it is present.- Specified by:
removeTimeSeriesin classDerivedLongGauge- Parameters:
labelValues- the list of label values.
-
clear
public void clear()Description copied from class:DerivedLongGaugeRemoves allTimeSeriesfrom the gauge metric.- Specified by:
clearin classDerivedLongGauge
-