Package io.opencensus.implcore.stats
Class MutableAggregation
- java.lang.Object
-
- io.opencensus.implcore.stats.MutableAggregation
-
- Direct Known Subclasses:
MutableAggregation.MutableCount,MutableAggregation.MutableDistribution,MutableAggregation.MutableLastValueDouble,MutableAggregation.MutableMean,MutableAggregation.MutableSumDouble
abstract class MutableAggregation extends java.lang.ObjectMutable version ofAggregationthat supports adding values.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classMutableAggregation.MutableCountCalculate count on aggregatedMeasureValues.(package private) static classMutableAggregation.MutableDistributionCalculate distribution stats on aggregatedMeasureValues.(package private) static classMutableAggregation.MutableLastValueDoubleCalculate double last value on aggregatedMeasureValues.(package private) static classMutableAggregation.MutableLastValueLongCalculate last long value on aggregatedMeasureValues.(package private) static classMutableAggregation.MutableMeanCalculate mean on aggregatedMeasureValues.(package private) static classMutableAggregation.MutableSumDoubleCalculate sum of doubles on aggregatedMeasureValues.(package private) static classMutableAggregation.MutableSumLongCalculate sum of longs on aggregatedMeasureValues.
-
Field Summary
Fields Modifier and Type Field Description private static doubleTOLERANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateMutableAggregation()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description (package private) abstract voidadd(double value, java.util.Map<java.lang.String,AttachmentValue> attachments, Timestamp timestamp)Put a new value into the MutableAggregation.(package private) abstract voidcombine(MutableAggregation other, double fraction)Combine the internal values of this MutableAggregation and value of the given MutableAggregation, with the given fraction.(package private) abstract AggregationDatatoAggregationData()(package private) abstract PointtoPoint(Timestamp timestamp)
-
-
-
Field Detail
-
TOLERANCE
private static final double TOLERANCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
add
abstract void add(double value, java.util.Map<java.lang.String,AttachmentValue> attachments, Timestamp timestamp)Put a new value into the MutableAggregation.- Parameters:
value- new value to be added to populationattachments- the contextual information on anExemplartimestamp- the timestamp when the value is recorded
-
combine
abstract void combine(MutableAggregation other, double fraction)
Combine the internal values of this MutableAggregation and value of the given MutableAggregation, with the given fraction. Then set the internal value of this MutableAggregation to the combined value.- Parameters:
other- the otherMutableAggregation. The type of this and otherMutableAggregationmust match.fraction- the fraction that the value in otherMutableAggregationshould contribute. Must be within [0.0, 1.0].
-
toAggregationData
abstract AggregationData toAggregationData()
-
-