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 mutableHistogramPointData
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 Attributes
attributes
private java.util.List<java.lang.Double>
boundaries
private long
count
private DynamicPrimitiveLongList
counts
private long
epochNanos
private java.util.List<DoubleExemplarData>
exemplars
private boolean
hasMax
private boolean
hasMin
private double
max
private double
min
private long
startEpochNanos
private double
sum
-
Constructor Summary
Constructors Constructor Description MutableHistogramPointData(int buckets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Attributes
getAttributes()
Returns the attributes of the aggregation.java.util.List<java.lang.Double>
getBoundaries()
The bucket boundaries.long
getCount()
The number of measurements taken.java.util.List<java.lang.Long>
getCounts()
The counts in each bucket.long
getEpochNanos()
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.double
getMax()
The max of all measurements recorded, ifHistogramPointData.hasMax()
istrue
.double
getMin()
The min of all measurements recorded, ifHistogramPointData.hasMin()
istrue
.long
getStartEpochNanos()
Returns the start time of the aggregation in epoch nanos.double
getSum()
The sum of all measurements recorded.int
hashCode()
boolean
hasMax()
Returntrue
ifHistogramPointData.getMax()
is set.boolean
hasMin()
Returntrue
ifHistogramPointData.getMin()
is set.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)
java.lang.String
toString()
-
-
-
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:PointData
Returns the start time of the aggregation in epoch nanos.- Specified by:
getStartEpochNanos
in interfacePointData
-
getEpochNanos
public long getEpochNanos()
Description copied from interface:PointData
Returns the end time of the aggregation in epoch nanos.- Specified by:
getEpochNanos
in interfacePointData
-
getAttributes
public Attributes getAttributes()
Description copied from interface:PointData
Returns the attributes of the aggregation.- Specified by:
getAttributes
in interfacePointData
-
getSum
public double getSum()
Description copied from interface:HistogramPointData
The sum of all measurements recorded.- Specified by:
getSum
in interfaceHistogramPointData
- Returns:
- the sum of recorded measurements.
-
getCount
public long getCount()
Description copied from interface:HistogramPointData
The number of measurements taken.- Specified by:
getCount
in interfaceHistogramPointData
- Returns:
- the count of recorded measurements.
-
hasMin
public boolean hasMin()
Description copied from interface:HistogramPointData
Returntrue
ifHistogramPointData.getMin()
is set.- Specified by:
hasMin
in interfaceHistogramPointData
-
getMin
public double getMin()
Description copied from interface:HistogramPointData
The min of all measurements recorded, ifHistogramPointData.hasMin()
istrue
. IfHistogramPointData.hasMin()
isfalse
, the response should be ignored.- Specified by:
getMin
in interfaceHistogramPointData
-
hasMax
public boolean hasMax()
Description copied from interface:HistogramPointData
Returntrue
ifHistogramPointData.getMax()
is set.- Specified by:
hasMax
in interfaceHistogramPointData
-
getMax
public double getMax()
Description copied from interface:HistogramPointData
The max of all measurements recorded, ifHistogramPointData.hasMax()
istrue
. IfHistogramPointData.hasMax()
isfalse
, the response should be ignored.- Specified by:
getMax
in interfaceHistogramPointData
-
getBoundaries
public java.util.List<java.lang.Double> getBoundaries()
Description copied from interface:HistogramPointData
The 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:
getBoundaries
in 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:HistogramPointData
The counts in each bucket.- Specified by:
getCounts
in 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:HistogramPointData
List of exemplars collected from measurements that were used to form the data point.- Specified by:
getExemplars
in interfaceHistogramPointData
- Specified by:
getExemplars
in interfacePointData
-
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
-
-