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.Object
Mutable version ofAggregation
that supports adding values.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
MutableAggregation.MutableCount
Calculate count on aggregatedMeasureValue
s.(package private) static class
MutableAggregation.MutableDistribution
Calculate distribution stats on aggregatedMeasureValue
s.(package private) static class
MutableAggregation.MutableLastValueDouble
Calculate double last value on aggregatedMeasureValue
s.(package private) static class
MutableAggregation.MutableLastValueLong
Calculate last long value on aggregatedMeasureValue
s.(package private) static class
MutableAggregation.MutableMean
Calculate mean on aggregatedMeasureValue
s.(package private) static class
MutableAggregation.MutableSumDouble
Calculate sum of doubles on aggregatedMeasureValue
s.(package private) static class
MutableAggregation.MutableSumLong
Calculate sum of longs on aggregatedMeasureValue
s.
-
Field Summary
Fields Modifier and Type Field Description private static double
TOLERANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
MutableAggregation()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description (package private) abstract void
add(double value, java.util.Map<java.lang.String,AttachmentValue> attachments, Timestamp timestamp)
Put a new value into the MutableAggregation.(package private) abstract void
combine(MutableAggregation other, double fraction)
Combine the internal values of this MutableAggregation and value of the given MutableAggregation, with the given fraction.(package private) abstract AggregationData
toAggregationData()
(package private) abstract Point
toPoint(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 anExemplar
timestamp
- 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 otherMutableAggregation
must match.fraction
- the fraction that the value in otherMutableAggregation
should contribute. Must be within [0.0, 1.0].
-
toAggregationData
abstract AggregationData toAggregationData()
-
-