Class MutableExponentialHistogramPointData
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.data.MutableExponentialHistogramPointData
-
- All Implemented Interfaces:
ExponentialHistogramPointData,PointData
public final class MutableExponentialHistogramPointData extends java.lang.Object implements ExponentialHistogramPointData
A mutableExponentialHistogramPointDataThis 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
Fields Modifier and Type Field Description private Attributesattributesprivate longcountprivate longepochNanosprivate java.util.List<DoubleExemplarData>exemplarsprivate booleanhasMaxprivate booleanhasMinprivate doublemaxprivate doubleminprivate ExponentialHistogramBucketsnegativeBucketsprivate ExponentialHistogramBucketspositiveBucketsprivate intscaleprivate longstartEpochNanosprivate doublesumprivate longzeroCount
-
Constructor Summary
Constructors Constructor Description MutableExponentialHistogramPointData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)AttributesgetAttributes()Returns the attributes of the aggregation.longgetCount()Returns the number of measurements taken for this data point, including the positive bucket counts, negative bucket counts, and the zero count.longgetEpochNanos()Returns the end time of the aggregation in epoch nanos.java.util.List<DoubleExemplarData>getExemplars()List of exemplars collected from measurements that were used to form the data point.doublegetMax()The max of all measurements recorded, ifExponentialHistogramPointData.hasMax()istrue.doublegetMin()The min of all measurements recorded, ifExponentialHistogramPointData.hasMin()istrue.ExponentialHistogramBucketsgetNegativeBuckets()Return theExponentialHistogramBucketsrepresenting the negative measurements taken for this histogram.ExponentialHistogramBucketsgetPositiveBuckets()Return theExponentialHistogramBucketsrepresenting the positive measurements taken for this histogram.intgetScale()Scale characterises the resolution of the histogram, with larger values of scale offering greater precision.longgetStartEpochNanos()Returns the start time of the aggregation in epoch nanos.doublegetSum()Returns the sum of all measurements in the data point.longgetZeroCount()Returns the number of measurements equal to zero in this data point.inthashCode()booleanhasMax()ReturntrueifExponentialHistogramPointData.getMax()is set.booleanhasMin()ReturntrueifExponentialHistogramPointData.getMin()is set.ExponentialHistogramPointDataset(int scale, double sum, long zeroCount, boolean hasMin, double min, boolean hasMax, double max, ExponentialHistogramBuckets positiveBuckets, ExponentialHistogramBuckets negativeBuckets, long startEpochNanos, long epochNanos, Attributes attributes, java.util.List<DoubleExemplarData> exemplars)java.lang.StringtoString()
-
-
-
Field Detail
-
startEpochNanos
private long startEpochNanos
-
epochNanos
private long epochNanos
-
attributes
private Attributes 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
private ExponentialHistogramBuckets positiveBuckets
-
negativeBuckets
private ExponentialHistogramBuckets negativeBuckets
-
exemplars
private java.util.List<DoubleExemplarData> exemplars
-
-
Method Detail
-
getScale
public int getScale()
Description copied from interface:ExponentialHistogramPointDataScale 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:
getScalein interfaceExponentialHistogramPointData- Returns:
- the scale.
-
getSum
public double getSum()
Description copied from interface:ExponentialHistogramPointDataReturns the sum of all measurements in the data point. The sum should be disregarded if there are both positive and negative measurements.- Specified by:
getSumin interfaceExponentialHistogramPointData- Returns:
- the sum of all measurements in this data point.
-
getCount
public long getCount()
Description copied from interface:ExponentialHistogramPointDataReturns the number of measurements taken for this data point, including the positive bucket counts, negative bucket counts, and the zero count.- Specified by:
getCountin interfaceExponentialHistogramPointData- Returns:
- the number of measurements in this data point.
-
getZeroCount
public long getZeroCount()
Description copied from interface:ExponentialHistogramPointDataReturns the number of measurements equal to zero in this data point.- Specified by:
getZeroCountin interfaceExponentialHistogramPointData- Returns:
- the number of values equal to zero.
-
hasMin
public boolean hasMin()
Description copied from interface:ExponentialHistogramPointDataReturntrueifExponentialHistogramPointData.getMin()is set.- Specified by:
hasMinin interfaceExponentialHistogramPointData
-
getMin
public double getMin()
Description copied from interface:ExponentialHistogramPointDataThe min of all measurements recorded, ifExponentialHistogramPointData.hasMin()istrue. IfExponentialHistogramPointData.hasMin()isfalse, the response should be ignored.- Specified by:
getMinin interfaceExponentialHistogramPointData
-
hasMax
public boolean hasMax()
Description copied from interface:ExponentialHistogramPointDataReturntrueifExponentialHistogramPointData.getMax()is set.- Specified by:
hasMaxin interfaceExponentialHistogramPointData
-
getMax
public double getMax()
Description copied from interface:ExponentialHistogramPointDataThe max of all measurements recorded, ifExponentialHistogramPointData.hasMax()istrue. IfExponentialHistogramPointData.hasMax()isfalse, the response should be ignored.- Specified by:
getMaxin interfaceExponentialHistogramPointData
-
getPositiveBuckets
public ExponentialHistogramBuckets getPositiveBuckets()
Description copied from interface:ExponentialHistogramPointDataReturn theExponentialHistogramBucketsrepresenting the positive measurements taken for this histogram.- Specified by:
getPositiveBucketsin interfaceExponentialHistogramPointData- Returns:
- the positive buckets.
-
getNegativeBuckets
public ExponentialHistogramBuckets getNegativeBuckets()
Description copied from interface:ExponentialHistogramPointDataReturn theExponentialHistogramBucketsrepresenting the negative measurements taken for this histogram.- Specified by:
getNegativeBucketsin interfaceExponentialHistogramPointData- Returns:
- the negative buckets.
-
getStartEpochNanos
public long getStartEpochNanos()
Description copied from interface:PointDataReturns the start time of the aggregation in epoch nanos.- Specified by:
getStartEpochNanosin interfacePointData
-
getEpochNanos
public long getEpochNanos()
Description copied from interface:PointDataReturns the end time of the aggregation in epoch nanos.- Specified by:
getEpochNanosin interfacePointData
-
getAttributes
public Attributes getAttributes()
Description copied from interface:PointDataReturns the attributes of the aggregation.- Specified by:
getAttributesin interfacePointData
-
getExemplars
public java.util.List<DoubleExemplarData> getExemplars()
Description copied from interface:ExponentialHistogramPointDataList of exemplars collected from measurements that were used to form the data point.- Specified by:
getExemplarsin interfaceExponentialHistogramPointData- Specified by:
getExemplarsin 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, java.util.List<DoubleExemplarData> exemplars)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-