Class MutableExponentialHistogramBuckets
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.data.MutableExponentialHistogramBuckets
-
- All Implemented Interfaces:
ExponentialHistogramBuckets
public final class MutableExponentialHistogramBuckets extends java.lang.Object implements ExponentialHistogramBuckets
A mutableExponentialHistogramBucketsThis 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 DynamicPrimitiveLongListbucketCountsprivate intoffsetprivate intscaleprivate longtotalCount
-
Constructor Summary
Constructors Constructor Description MutableExponentialHistogramBuckets()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<java.lang.Long>getBucketCounts()The bucket counts is a list of counts representing number of measurements that fall into each bucket.intgetOffset()The offset shifts the bucket boundaries according tolower_bound = base^(offset+i).DynamicPrimitiveLongListgetReusableBucketCountsList()intgetScale()The scale of the buckets.longgetTotalCount()The total count is the sum of all the values in the buckets.inthashCode()MutableExponentialHistogramBucketsset(int scale, int offset, long totalCount, DynamicPrimitiveLongList bucketCounts)java.lang.StringtoString()
-
-
-
Field Detail
-
scale
private int scale
-
offset
private int offset
-
totalCount
private long totalCount
-
bucketCounts
private DynamicPrimitiveLongList bucketCounts
-
-
Method Detail
-
getScale
public int getScale()
Description copied from interface:ExponentialHistogramBucketsThe scale of the buckets. Must align withExponentialHistogramPointData.getScale().- Specified by:
getScalein interfaceExponentialHistogramBuckets
-
getOffset
public int getOffset()
Description copied from interface:ExponentialHistogramBucketsThe offset shifts the bucket boundaries according tolower_bound = base^(offset+i)..- Specified by:
getOffsetin interfaceExponentialHistogramBuckets- Returns:
- the offset.
-
getBucketCounts
public java.util.List<java.lang.Long> getBucketCounts()
Description copied from interface:ExponentialHistogramBucketsThe bucket counts is a list of counts representing number of measurements that fall into each bucket.- Specified by:
getBucketCountsin interfaceExponentialHistogramBuckets- Returns:
- the bucket counts.
-
getReusableBucketCountsList
public DynamicPrimitiveLongList getReusableBucketCountsList()
-
getTotalCount
public long getTotalCount()
Description copied from interface:ExponentialHistogramBucketsThe total count is the sum of all the values in the buckets.- Specified by:
getTotalCountin interfaceExponentialHistogramBuckets- Returns:
- the total count.
-
set
public MutableExponentialHistogramBuckets set(int scale, int offset, long totalCount, DynamicPrimitiveLongList bucketCounts)
-
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
-
-