Class DerivedDoubleCumulativeImpl
java.lang.Object
io.opencensus.metrics.DerivedDoubleCumulative
io.opencensus.implcore.metrics.DerivedDoubleCumulativeImpl
Implementation of
DerivedDoubleCumulative.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classImplementation ofDerivedDoubleCumulativeImpl.PointWithFunctionwith an object and a callback function. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes allTimeSeriesfrom the cumulative metric.<T> voidcreateTimeSeries(List<LabelValue> labelValues, T obj, ToDoubleFunction<T> function) Creates aTimeSeries.voidremoveTimeSeries(List<LabelValue> labelValues) Removes theTimeSeriesfrom the cumulative metric, if it is present.
-
Method Details
-
createTimeSeries
public <T> void createTimeSeries(List<LabelValue> labelValues, @Nullable T obj, ToDoubleFunction<T> function) Description copied from class:DerivedDoubleCumulativeCreates 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 classDerivedDoubleCumulative- 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:DerivedDoubleCumulativeRemoves theTimeSeriesfrom the cumulative metric, if it is present.- Specified by:
removeTimeSeriesin classDerivedDoubleCumulative- Parameters:
labelValues- the list of label values.
-
clear
public void clear()Description copied from class:DerivedDoubleCumulativeRemoves allTimeSeriesfrom the cumulative metric.- Specified by:
clearin classDerivedDoubleCumulative
-
getMetricDescriptor
-
getMetric
-