Class MutableHistogramPointData
java.lang.Object
io.opentelemetry.sdk.metrics.internal.data.MutableHistogramPointData
- All Implemented Interfaces:
HistogramPointData,PointData
A mutable
HistogramPointData
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 Attributesprivate longprivate final DynamicPrimitiveLongListprivate longprivate List<DoubleExemplarData> private booleanprivate booleanprivate doubleprivate doubleprivate longprivate double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the attributes of the aggregation.The bucket boundaries.longgetCount()The number of measurements taken.The counts in each bucket.longReturns the end time of the aggregation in epoch nanos.List of exemplars collected from measurements that were used to form the data point.doublegetMax()The max of all measurements recorded, ifHistogramPointData.hasMax()istrue.doublegetMin()The min of all measurements recorded, ifHistogramPointData.hasMin()istrue.longReturns the start time of the aggregation in epoch nanos.doublegetSum()The sum of all measurements recorded.inthashCode()booleanhasMax()ReturntrueifHistogramPointData.getMax()is set.booleanhasMin()ReturntrueifHistogramPointData.getMin()is set.set(long startEpochNanos, long epochNanos, Attributes attributes, double sum, boolean hasMin, double min, boolean hasMax, double max, List<Double> boundaries, long[] counts, List<DoubleExemplarData> exemplars) toString()
-
Field Details
-
startEpochNanos
private long startEpochNanos -
epochNanos
private long epochNanos -
attributes
-
sum
private double sum -
count
private long count -
hasMin
private boolean hasMin -
min
private double min -
hasMax
private boolean hasMax -
max
private double max -
boundaries
-
counts
-
exemplars
-
-
Constructor Details
-
MutableHistogramPointData
public MutableHistogramPointData(int buckets)
-
-
Method Details
-
set
public MutableHistogramPointData set(long startEpochNanos, long epochNanos, Attributes attributes, double sum, boolean hasMin, double min, boolean hasMax, double max, List<Double> boundaries, long[] counts, List<DoubleExemplarData> exemplars) -
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
Description copied from interface:PointDataReturns the attributes of the aggregation.- Specified by:
getAttributesin interfacePointData
-
getSum
public double getSum()Description copied from interface:HistogramPointDataThe sum of all measurements recorded.- Specified by:
getSumin interfaceHistogramPointData- Returns:
- the sum of recorded measurements.
-
getCount
public long getCount()Description copied from interface:HistogramPointDataThe number of measurements taken.- Specified by:
getCountin interfaceHistogramPointData- Returns:
- the count of recorded measurements.
-
hasMin
public boolean hasMin()Description copied from interface:HistogramPointDataReturntrueifHistogramPointData.getMin()is set.- Specified by:
hasMinin interfaceHistogramPointData
-
getMin
public double getMin()Description copied from interface:HistogramPointDataThe min of all measurements recorded, ifHistogramPointData.hasMin()istrue. IfHistogramPointData.hasMin()isfalse, the response should be ignored.- Specified by:
getMinin interfaceHistogramPointData
-
hasMax
public boolean hasMax()Description copied from interface:HistogramPointDataReturntrueifHistogramPointData.getMax()is set.- Specified by:
hasMaxin interfaceHistogramPointData
-
getMax
public double getMax()Description copied from interface:HistogramPointDataThe max of all measurements recorded, ifHistogramPointData.hasMax()istrue. IfHistogramPointData.hasMax()isfalse, the response should be ignored.- Specified by:
getMaxin interfaceHistogramPointData
-
getBoundaries
Description copied from interface:HistogramPointDataThe bucket boundaries. For a Histogram with N defined boundaries, e.g, [x, y, z]. There are N+1 counts: (-inf, x], (x, y], (y, z], (z, +inf).- Specified by:
getBoundariesin interfaceHistogramPointData- Returns:
- the read-only bucket boundaries in increasing order. do not mutate the returned object.
-
getCounts
Description copied from interface:HistogramPointDataThe counts in each bucket.- Specified by:
getCountsin interfaceHistogramPointData- Returns:
- the read-only counts in each bucket. do not mutate the returned object.
-
getExemplars
Description copied from interface:HistogramPointDataList of exemplars collected from measurements that were used to form the data point.- Specified by:
getExemplarsin interfaceHistogramPointData- Specified by:
getExemplarsin interfacePointData
-
toString
-
equals
-
hashCode
public int hashCode()
-