Interface Aggregator
-
- All Known Implementing Classes:
DoubleLastValueAggregator,DoubleMinMaxSumCount,DoubleSumAggregator,LongLastValueAggregator,LongMinMaxSumCount,LongSumAggregator,NoopAggregator
@ThreadSafe public interface AggregatorAggregator represents the interface for all the available aggregations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanhasRecordings()Whether there have been any recordings since this aggregator has been reset.voidmergeToAndReset(Aggregator aggregator)Merges the current value into the givenaggregatorand resets the current value in thisAggregator.voidrecordDouble(double value)Updates the current aggregator with a newly recordeddoublevalue.voidrecordLong(long value)Updates the current aggregator with a newly recordedlongvalue.MetricData.PointtoPoint(long startEpochNanos, long epochNanos, io.opentelemetry.api.common.Labels labels)Returns thePointwith the given properties and the value from this Aggregation.
-
-
-
Method Detail
-
mergeToAndReset
void mergeToAndReset(Aggregator aggregator)
Merges the current value into the givenaggregatorand resets the current value in thisAggregator.- Parameters:
aggregator- value to merge into.
-
toPoint
@Nullable MetricData.Point toPoint(long startEpochNanos, long epochNanos, io.opentelemetry.api.common.Labels labels)
Returns thePointwith the given properties and the value from this Aggregation.- Parameters:
startEpochNanos- the startEpochNanos for thePoint.epochNanos- the epochNanos for thePoint.labels- the labels for thePoint.- Returns:
- the
Pointwith the value from this Aggregation.
-
recordLong
void recordLong(long value)
Updates the current aggregator with a newly recordedlongvalue.- Parameters:
value- the newlongvalue to be added.
-
recordDouble
void recordDouble(double value)
Updates the current aggregator with a newly recordeddoublevalue.- Parameters:
value- the newdoublevalue to be added.
-
hasRecordings
boolean hasRecordings()
Whether there have been any recordings since this aggregator has been reset.
-
-