Package io.opencensus.implcore.stats
Class MutableAggregation.MutableLastValueDouble
- java.lang.Object
-
- io.opencensus.implcore.stats.MutableAggregation
-
- io.opencensus.implcore.stats.MutableAggregation.MutableLastValueDouble
-
- Direct Known Subclasses:
MutableAggregation.MutableLastValueLong
- Enclosing class:
- MutableAggregation
static class MutableAggregation.MutableLastValueDouble extends MutableAggregation
Calculate double last value on aggregatedMeasureValue
s.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.opencensus.implcore.stats.MutableAggregation
MutableAggregation.MutableCount, MutableAggregation.MutableDistribution, MutableAggregation.MutableLastValueDouble, MutableAggregation.MutableLastValueLong, MutableAggregation.MutableMean, MutableAggregation.MutableSumDouble, MutableAggregation.MutableSumLong
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
initialized
private double
lastValue
-
Constructor Summary
Constructors Modifier Constructor Description private
MutableLastValueDouble()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
add(double value, java.util.Map<java.lang.String,AttachmentValue> attachments, Timestamp timestamp)
Put a new value into the MutableAggregation.(package private) 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) static MutableAggregation.MutableLastValueDouble
create()
Construct aMutableLastValueDouble
.(package private) double
getLastValue()
(package private) AggregationData
toAggregationData()
(package private) Point
toPoint(Timestamp timestamp)
-
-
-
Method Detail
-
create
static MutableAggregation.MutableLastValueDouble create()
Construct aMutableLastValueDouble
.- Returns:
- an empty
MutableLastValueDouble
.
-
add
void add(double value, java.util.Map<java.lang.String,AttachmentValue> attachments, Timestamp timestamp)
Description copied from class:MutableAggregation
Put a new value into the MutableAggregation.- Specified by:
add
in classMutableAggregation
- Parameters:
value
- new value to be added to populationattachments
- the contextual information on anExemplar
timestamp
- the timestamp when the value is recorded
-
combine
void combine(MutableAggregation other, double fraction)
Description copied from class:MutableAggregation
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.- Specified by:
combine
in classMutableAggregation
- 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
AggregationData toAggregationData()
- Specified by:
toAggregationData
in classMutableAggregation
-
toPoint
Point toPoint(Timestamp timestamp)
- Specified by:
toPoint
in classMutableAggregation
-
getLastValue
double getLastValue()
-
-