Class MutableHistogramPointData
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.data.MutableHistogramPointData
-
- All Implemented Interfaces:
HistogramPointData,PointData
public final class MutableHistogramPointData extends java.lang.Object implements HistogramPointData
A mutableHistogramPointDataThis 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 java.util.List<java.lang.Double>boundariesprivate longcountprivate DynamicPrimitiveLongListcountsprivate longepochNanosprivate java.util.List<DoubleExemplarData>exemplarsprivate booleanhasMaxprivate booleanhasMinprivate doublemaxprivate doubleminprivate longstartEpochNanosprivate doublesum
-
Constructor Summary
Constructors Constructor Description MutableHistogramPointData(int buckets)
-
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.java.util.List<java.lang.Double>getBoundaries()The bucket boundaries.longgetCount()The number of measurements taken.java.util.List<java.lang.Long>getCounts()The counts in each bucket.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, ifHistogramPointData.hasMax()istrue.doublegetMin()The min of all measurements recorded, ifHistogramPointData.hasMin()istrue.longgetStartEpochNanos()Returns 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.MutableHistogramPointDataset(long startEpochNanos, long epochNanos, Attributes attributes, double sum, boolean hasMin, double min, boolean hasMax, double max, java.util.List<java.lang.Double> boundaries, long[] counts, java.util.List<DoubleExemplarData> exemplars)java.lang.StringtoString()
-
-
-
Field Detail
-
startEpochNanos
private long startEpochNanos
-
epochNanos
private long epochNanos
-
attributes
private Attributes 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
private java.util.List<java.lang.Double> boundaries
-
counts
private final DynamicPrimitiveLongList counts
-
exemplars
private java.util.List<DoubleExemplarData> exemplars
-
-
Method Detail
-
set
public MutableHistogramPointData set(long startEpochNanos, long epochNanos, Attributes attributes, double sum, boolean hasMin, double min, boolean hasMax, double max, java.util.List<java.lang.Double> boundaries, long[] counts, java.util.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
public Attributes 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
public java.util.List<java.lang.Double> 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
public java.util.List<java.lang.Long> 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
public java.util.List<DoubleExemplarData> 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
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
-
-