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 mutableExponentialHistogramBuckets
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
Fields Modifier and Type Field Description private DynamicPrimitiveLongList
bucketCounts
private int
offset
private int
scale
private long
totalCount
-
Constructor Summary
Constructors Constructor Description MutableExponentialHistogramBuckets()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(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.int
getOffset()
The offset shifts the bucket boundaries according tolower_bound = base^(offset+i).
DynamicPrimitiveLongList
getReusableBucketCountsList()
int
getScale()
The scale of the buckets.long
getTotalCount()
The total count is the sum of all the values in the buckets.int
hashCode()
MutableExponentialHistogramBuckets
set(int scale, int offset, long totalCount, DynamicPrimitiveLongList bucketCounts)
java.lang.String
toString()
-
-
-
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:ExponentialHistogramBuckets
The scale of the buckets. Must align withExponentialHistogramPointData.getScale()
.- Specified by:
getScale
in interfaceExponentialHistogramBuckets
-
getOffset
public int getOffset()
Description copied from interface:ExponentialHistogramBuckets
The offset shifts the bucket boundaries according tolower_bound = base^(offset+i).
.- Specified by:
getOffset
in interfaceExponentialHistogramBuckets
- Returns:
- the offset.
-
getBucketCounts
public java.util.List<java.lang.Long> getBucketCounts()
Description copied from interface:ExponentialHistogramBuckets
The bucket counts is a list of counts representing number of measurements that fall into each bucket.- Specified by:
getBucketCounts
in interfaceExponentialHistogramBuckets
- Returns:
- the bucket counts.
-
getReusableBucketCountsList
public DynamicPrimitiveLongList getReusableBucketCountsList()
-
getTotalCount
public long getTotalCount()
Description copied from interface:ExponentialHistogramBuckets
The total count is the sum of all the values in the buckets.- Specified by:
getTotalCount
in interfaceExponentialHistogramBuckets
- Returns:
- the total count.
-
set
public MutableExponentialHistogramBuckets set(int scale, int offset, long totalCount, DynamicPrimitiveLongList bucketCounts)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-