Class LongSumAggregator

    • Method Detail

      • diff

        public LongPointData diff​(LongPointData previousPoint,
                                  LongPointData currentPoint)
        Description copied from interface: Aggregator
        Returns a new DELTA point by computing the difference between two cumulative points.

        Aggregators MUST implement diff if it can be used with asynchronous instruments.

        Parameters:
        previousPoint - the previously captured point.
        currentPoint - the newly captured (cumulative) point.
        Returns:
        The resulting delta point.
      • diffInPlace

        public void diffInPlace​(LongPointData previousReusablePoint,
                                LongPointData currentPoint)
        Description copied from interface: Aggregator
        Resets one reusable point to be a DELTA point by computing the difference between two cumulative points.

        The delta between the two points is set on previousCumulativeReusable

        Aggregators MUST implement diff if it can be used with asynchronous instruments.

        Parameters:
        previousReusablePoint - the previously captured point.
        currentPoint - the newly captured (cumulative) point.
      • toPoint

        public LongPointData toPoint​(Measurement measurement)
        Description copied from interface: Aggregator
        Return a new point representing the measurement.

        Aggregators MUST implement diff if it can be used with asynchronous instruments.

      • toPoint

        public void toPoint​(Measurement measurement,
                            LongPointData reusablePoint)
        Description copied from interface: Aggregator
        Resets reusablePoint to represent the measurement.

        Aggregators MUST implement diff if it can be used with asynchronous instruments.

      • createReusablePoint

        public LongPointData createReusablePoint()
        Description copied from interface: Aggregator
        Creates a new reusable point.
      • toMetricData

        public MetricData toMetricData​(Resource resource,
                                       InstrumentationScopeInfo instrumentationScopeInfo,
                                       MetricDescriptor descriptor,
                                       java.util.Collection<LongPointData> points,
                                       AggregationTemporality temporality)
        Description copied from interface: Aggregator
        Returns the MetricData that this Aggregation will produce.
        Parameters:
        resource - the resource producing the metric.
        instrumentationScopeInfo - the scope that instrumented the metric.
        descriptor - the name, description and unit of the metric.
        points - list of points
        temporality - the temporality of the metric.
        Returns:
        the MetricDataType that this Aggregation will produce.