public final class LongSumAggregator extends Object
Constructor and Description |
---|
LongSumAggregator() |
Modifier and Type | Method and Description |
---|---|
static AggregatorFactory |
getFactory()
Returns an
AggregatorFactory that produces LongSumAggregator instances. |
void |
mergeToAndReset(Aggregator other)
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.common.Labels labels)
Returns the
Point with the given properties and the value from this Aggregation. |
public static AggregatorFactory getFactory()
AggregatorFactory
that produces LongSumAggregator
instances.AggregatorFactory
that produces LongSumAggregator
instances.public MetricData.Point toPoint(long startEpochNanos, long epochNanos, io.opentelemetry.common.Labels labels)
Aggregator
Point
with the given properties and the value from this Aggregation.startEpochNanos
- the startEpochNanos for the Point
.epochNanos
- the epochNanos for the Point
.labels
- the labels for the Point
.Point
with the value from this Aggregation.public void recordLong(long value)
Aggregator
long
value.recordLong
in interface Aggregator
value
- the new long
value to be added.public void mergeToAndReset(Aggregator other)
Aggregator
aggregator
and resets the current value in this
Aggregator
.mergeToAndReset
in interface Aggregator
other
- value to merge into.public void recordDouble(double value)
Aggregator
double
value.recordDouble
in interface Aggregator
value
- the new double
value to be added.