Class AggregatorHandle<T extends PointData,​U extends ExemplarData>

    • Constructor Detail

      • AggregatorHandle

        protected AggregatorHandle​(ExemplarReservoir<U> exemplarReservoir)
    • Method Detail

      • aggregateThenMaybeReset

        public final T aggregateThenMaybeReset​(long startEpochNanos,
                                               long epochNanos,
                                               Attributes attributes,
                                               boolean reset)
        Returns the current value into as AggregatorHandle. If reset is true, resets the current value in this Aggregator.
      • recordLong

        public final void recordLong​(long value,
                                     Attributes attributes,
                                     Context context)
      • recordLong

        public final void recordLong​(long value)
        Updates the current aggregator with a newly recorded long value.

        Visible for Testing

        Parameters:
        value - the new long value to be added.
      • doRecordLong

        protected void doRecordLong​(long value)
        Concrete Aggregator instances should implement this method in order support recordings of long values.
      • recordDouble

        public final void recordDouble​(double value,
                                       Attributes attributes,
                                       Context context)
      • recordDouble

        public final void recordDouble​(double value)
        Updates the current aggregator with a newly recorded double value.

        Visible for Testing

        Parameters:
        value - the new double value to be added.
      • doRecordDouble

        protected void doRecordDouble​(double value)
        Concrete Aggregator instances should implement this method in order support recordings of double values.
      • hasRecordedValues

        public boolean hasRecordedValues()
        Checks whether this handle has values recorded.
        Returns:
        True if values has been recorded to it