Class MutableExponentialHistogramPointData
java.lang.Object
io.opentelemetry.sdk.metrics.internal.data.MutableExponentialHistogramPointData
- All Implemented Interfaces:
ExponentialHistogramPointData
,PointData
public final class MutableExponentialHistogramPointData
extends Object
implements ExponentialHistogramPointData
A mutable
ExponentialHistogramPointData
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
This class is not thread-safe.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Attributes
private long
private long
private List
<DoubleExemplarData> private boolean
private boolean
private double
private double
private ExponentialHistogramBuckets
private ExponentialHistogramBuckets
private int
private long
private double
private long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the attributes of the aggregation.long
getCount()
Returns the number of measurements taken for this data point, including the positive bucket counts, negative bucket counts, and the zero count.long
Returns the end time of the aggregation in epoch nanos.List of exemplars collected from measurements that were used to form the data point.double
getMax()
The max of all measurements recorded, ifExponentialHistogramPointData.hasMax()
istrue
.double
getMin()
The min of all measurements recorded, ifExponentialHistogramPointData.hasMin()
istrue
.Return theExponentialHistogramBuckets
representing the negative measurements taken for this histogram.Return theExponentialHistogramBuckets
representing the positive measurements taken for this histogram.int
getScale()
Scale characterises the resolution of the histogram, with larger values of scale offering greater precision.long
Returns the start time of the aggregation in epoch nanos.double
getSum()
Returns the sum of all measurements in the data point.long
Returns the number of measurements equal to zero in this data point.int
hashCode()
boolean
hasMax()
Returntrue
ifExponentialHistogramPointData.getMax()
is set.boolean
hasMin()
Returntrue
ifExponentialHistogramPointData.getMin()
is set.set
(int scale, double sum, long zeroCount, boolean hasMin, double min, boolean hasMax, double max, ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) toString()
-
Field Details
-
startEpochNanos
private long startEpochNanos -
epochNanos
private long epochNanos -
attributes
-
scale
private int scale -
sum
private double sum -
count
private long count -
zeroCount
private long zeroCount -
hasMin
private boolean hasMin -
min
private double min -
hasMax
private boolean hasMax -
max
private double max -
positiveBuckets
-
negativeBuckets
-
exemplars
-
-
Constructor Details
-
MutableExponentialHistogramPointData
public MutableExponentialHistogramPointData()
-
-
Method Details
-
getScale
public int getScale()Description copied from interface:ExponentialHistogramPointData
Scale characterises the resolution of the histogram, with larger values of scale offering greater precision. Bucket boundaries of the histogram are located at integer powers of the base, wherebase = Math.pow(2, Math.pow(2, -scale))
.- Specified by:
getScale
in interfaceExponentialHistogramPointData
- Returns:
- the scale.
-
getSum
public double getSum()Description copied from interface:ExponentialHistogramPointData
Returns the sum of all measurements in the data point. The sum should be disregarded if there are both positive and negative measurements.- Specified by:
getSum
in interfaceExponentialHistogramPointData
- Returns:
- the sum of all measurements in this data point.
-
getCount
public long getCount()Description copied from interface:ExponentialHistogramPointData
Returns the number of measurements taken for this data point, including the positive bucket counts, negative bucket counts, and the zero count.- Specified by:
getCount
in interfaceExponentialHistogramPointData
- Returns:
- the number of measurements in this data point.
-
getZeroCount
public long getZeroCount()Description copied from interface:ExponentialHistogramPointData
Returns the number of measurements equal to zero in this data point.- Specified by:
getZeroCount
in interfaceExponentialHistogramPointData
- Returns:
- the number of values equal to zero.
-
hasMin
public boolean hasMin()Description copied from interface:ExponentialHistogramPointData
Returntrue
ifExponentialHistogramPointData.getMin()
is set.- Specified by:
hasMin
in interfaceExponentialHistogramPointData
-
getMin
public double getMin()Description copied from interface:ExponentialHistogramPointData
The min of all measurements recorded, ifExponentialHistogramPointData.hasMin()
istrue
. IfExponentialHistogramPointData.hasMin()
isfalse
, the response should be ignored.- Specified by:
getMin
in interfaceExponentialHistogramPointData
-
hasMax
public boolean hasMax()Description copied from interface:ExponentialHistogramPointData
Returntrue
ifExponentialHistogramPointData.getMax()
is set.- Specified by:
hasMax
in interfaceExponentialHistogramPointData
-
getMax
public double getMax()Description copied from interface:ExponentialHistogramPointData
The max of all measurements recorded, ifExponentialHistogramPointData.hasMax()
istrue
. IfExponentialHistogramPointData.hasMax()
isfalse
, the response should be ignored.- Specified by:
getMax
in interfaceExponentialHistogramPointData
-
getPositiveBuckets
Description copied from interface:ExponentialHistogramPointData
Return theExponentialHistogramBuckets
representing the positive measurements taken for this histogram.- Specified by:
getPositiveBuckets
in interfaceExponentialHistogramPointData
- Returns:
- the positive buckets.
-
getNegativeBuckets
Description copied from interface:ExponentialHistogramPointData
Return theExponentialHistogramBuckets
representing the negative measurements taken for this histogram.- Specified by:
getNegativeBuckets
in interfaceExponentialHistogramPointData
- Returns:
- the negative buckets.
-
getStartEpochNanos
public long getStartEpochNanos()Description copied from interface:PointData
Returns the start time of the aggregation in epoch nanos.- Specified by:
getStartEpochNanos
in interfacePointData
-
getEpochNanos
public long getEpochNanos()Description copied from interface:PointData
Returns the end time of the aggregation in epoch nanos.- Specified by:
getEpochNanos
in interfacePointData
-
getAttributes
Description copied from interface:PointData
Returns the attributes of the aggregation.- Specified by:
getAttributes
in interfacePointData
-
getExemplars
Description copied from interface:ExponentialHistogramPointData
List of exemplars collected from measurements that were used to form the data point.- Specified by:
getExemplars
in interfaceExponentialHistogramPointData
- Specified by:
getExemplars
in interfacePointData
-
set
public ExponentialHistogramPointData set(int scale, double sum, long zeroCount, boolean hasMin, double min, boolean hasMax, double max, ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets, long startEpochNanos, long epochNanos, Attributes attributes, List<DoubleExemplarData> exemplars) -
toString
-
equals
-
hashCode
public int hashCode()
-