Interface Aggregator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean hasRecordings()
      Whether there have been any recordings since this aggregator has been reset.
      void mergeToAndReset​(Aggregator aggregator)
      Merges the current value into the given aggregator and resets the current value in this Aggregator.
      void recordDouble​(double value)
      Updates the current aggregator with a newly recorded double value.
      void recordLong​(long value)
      Updates the current aggregator with a newly recorded long value.
      MetricData.Point toPoint​(long startEpochNanos, long epochNanos, io.opentelemetry.api.common.Labels labels)
      Returns the Point with the given properties and the value from this Aggregation.
    • Method Detail

      • mergeToAndReset

        void mergeToAndReset​(Aggregator aggregator)
        Merges the current value into the given aggregator and resets the current value in this Aggregator.
        Parameters:
        aggregator - value to merge into.
      • toPoint

        @Nullable
        MetricData.Point toPoint​(long startEpochNanos,
                                 long epochNanos,
                                 io.opentelemetry.api.common.Labels labels)
        Returns the Point with the given properties and the value from this Aggregation.
        Parameters:
        startEpochNanos - the startEpochNanos for the Point.
        epochNanos - the epochNanos for the Point.
        labels - the labels for the Point.
        Returns:
        the Point with the value from this Aggregation.
      • recordLong

        void recordLong​(long value)
        Updates the current aggregator with a newly recorded long value.
        Parameters:
        value - the new long value to be added.
      • recordDouble

        void recordDouble​(double value)
        Updates the current aggregator with a newly recorded double value.
        Parameters:
        value - the new double value to be added.
      • hasRecordings

        boolean hasRecordings()
        Whether there have been any recordings since this aggregator has been reset.