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
Mutable version of
Aggregation
that supports adding values.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
Calculate count on aggregatedMeasureValue
s.(package private) static final class
Calculate distribution stats on aggregatedMeasureValue
s.(package private) static class
Calculate double last value on aggregatedMeasureValue
s.(package private) static final class
Calculate last long value on aggregatedMeasureValue
s.(package private) static final class
Calculate mean on aggregatedMeasureValue
s.(package private) static class
Calculate sum of doubles on aggregatedMeasureValue
s.(package private) static final class
Calculate sum of longs on aggregatedMeasureValue
s. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) abstract void
add
(double value, Map<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
(package private) abstract Point
-
Field Details
-
TOLERANCE
private static final double TOLERANCE- See Also:
-
-
Constructor Details
-
MutableAggregation
private MutableAggregation()
-
-
Method Details
-
add
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
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
-
toPoint
-