Package io.opencensus.metrics
Class DerivedDoubleGauge.NoopDerivedDoubleGauge
java.lang.Object
io.opencensus.metrics.DerivedDoubleGauge
io.opencensus.metrics.DerivedDoubleGauge.NoopDerivedDoubleGauge
- Enclosing class:
DerivedDoubleGauge
No-op implementations of DerivedDoubleGauge class.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes allTimeSeries
from the gauge metric.(package private) static DerivedDoubleGauge.NoopDerivedDoubleGauge
<T> void
createTimeSeries
(List<LabelValue> labelValues, T obj, ToDoubleFunction<T> function) Creates aTimeSeries
.void
removeTimeSeries
(List<LabelValue> labelValues) Removes theTimeSeries
from the gauge metric, if it is present.Methods inherited from class io.opencensus.metrics.DerivedDoubleGauge
newNoopDerivedDoubleGauge
-
Field Details
-
labelKeysSize
private final int labelKeysSize
-
-
Constructor Details
-
NoopDerivedDoubleGauge
Creates a newNoopDerivedDoubleGauge
.
-
-
Method Details
-
create
-
createTimeSeries
Description copied from class:DerivedDoubleGauge
Creates 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 aWeakReference
to the object and it is the user's responsibility to manage the lifetime of the object.- Specified by:
createTimeSeries
in classDerivedDoubleGauge
- 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:DerivedDoubleGauge
Removes theTimeSeries
from the gauge metric, if it is present.- Specified by:
removeTimeSeries
in classDerivedDoubleGauge
- Parameters:
labelValues
- the list of label values.
-
clear
public void clear()Description copied from class:DerivedDoubleGauge
Removes allTimeSeries
from the gauge metric.- Specified by:
clear
in classDerivedDoubleGauge
-