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 Object
Mutable version of Aggregation that supports adding values.
  • Field Details

  • Constructor Details

    • MutableAggregation

      private MutableAggregation()
  • Method Details

    • add

      abstract void add(double value, Map<String,AttachmentValue> attachments, Timestamp timestamp)
      Put a new value into the MutableAggregation.
      Parameters:
      value - new value to be added to population
      attachments - the contextual information on an Exemplar
      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 other MutableAggregation. The type of this and other MutableAggregation must match.
      fraction - the fraction that the value in other MutableAggregation should contribute. Must be within [0.0, 1.0].
    • toAggregationData

      abstract AggregationData toAggregationData()
    • toPoint

      abstract Point toPoint(Timestamp timestamp)