Class LongSumAggregator
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.aggregator.LongSumAggregator
-
- All Implemented Interfaces:
Aggregator
public final class LongSumAggregator extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description LongSumAggregator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoRecordDouble(double value)Concrete Aggregator instances should implement this method in order support recordings of double values.voiddoRecordLong(long value)Concrete Aggregator instances should implement this method in order support recordings of long values.static AggregatorFactorygetFactory()Returns anAggregatorFactorythat producesLongSumAggregatorinstances.booleanhasRecordings()Whether there have been any recordings since this aggregator has been reset.voidmergeToAndReset(Aggregator other)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
-
getFactory
public static AggregatorFactory getFactory()
Returns anAggregatorFactorythat producesLongSumAggregatorinstances.- Returns:
- an
AggregatorFactorythat producesLongSumAggregatorinstances.
-
toPoint
public MetricData.Point toPoint(long startEpochNanos, long epochNanos, io.opentelemetry.api.common.Labels labels)
Description copied from interface:AggregatorReturns 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.
-
doRecordLong
public void doRecordLong(long value)
Concrete Aggregator instances should implement this method in order support recordings of long values.
-
mergeToAndReset
public void mergeToAndReset(Aggregator other)
Description copied from interface:AggregatorMerges the current value into the givenaggregatorand resets the current value in thisAggregator.- Specified by:
mergeToAndResetin interfaceAggregator- Parameters:
other- value to merge into.
-
recordLong
public final void recordLong(long value)
Description copied from interface:AggregatorUpdates the current aggregator with a newly recordedlongvalue.- Specified by:
recordLongin interfaceAggregator- Parameters:
value- the newlongvalue to be added.
-
recordDouble
public final void recordDouble(double value)
Description copied from interface:AggregatorUpdates the current aggregator with a newly recordeddoublevalue.- Specified by:
recordDoublein interfaceAggregator- Parameters:
value- the newdoublevalue to be added.
-
doRecordDouble
protected void doRecordDouble(double value)
Concrete Aggregator instances should implement this method in order support recordings of double values.
-
hasRecordings
public boolean hasRecordings()
Description copied from interface:AggregatorWhether there have been any recordings since this aggregator has been reset.- Specified by:
hasRecordingsin interfaceAggregator
-
-