Class AggregatedValueObject
- java.lang.Object
-
- org.glassfish.jersey.server.internal.monitoring.AggregatedValueObject
-
class AggregatedValueObject extends java.lang.Object
Aggregated value object stores aggregated measurements for provided set of data. The purpose of aggregation is to avoid high memory and processor time requirements for the calculation of statistics.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
AggregatedValueObject(long max, long min, double mean, long count)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AggregatedValueObject
createFromMultiValues(java.util.Collection<? extends java.util.Collection<java.lang.Long>> values)
Creates aggregated value object for monitoring statistics based on the provided collection of values.static AggregatedValueObject
createFromValues(java.util.Collection<java.lang.Long> values)
Creates aggregated value object for monitoring statistics based on the provided values.long
getCount()
long
getMax()
double
getMean()
long
getMin()
-
-
-
Method Detail
-
createFromValues
public static AggregatedValueObject createFromValues(java.util.Collection<java.lang.Long> values)
Creates aggregated value object for monitoring statistics based on the provided values. During the construction, the values collection must not be modified.- Parameters:
values
- The collection to create the aggregated statistics from.- Returns:
- Aggregated value object for provided arguments.
-
createFromMultiValues
public static AggregatedValueObject createFromMultiValues(java.util.Collection<? extends java.util.Collection<java.lang.Long>> values)
Creates aggregated value object for monitoring statistics based on the provided collection of values. During the construction, the values collection must not be modified.- Parameters:
values
- The collection to create the aggregated statistics from.- Returns:
- Aggregated value object for provided arguments.
-
getMax
public long getMax()
- Returns:
- The maximum value of the aggregated data
-
getMin
public long getMin()
- Returns:
- The minimum value of the aggregated data
-
getMean
public double getMean()
- Returns:
- The mean of the aggregated data
-
getCount
public long getCount()
- Returns:
- The total number of the values this aggregated data provide information about
-
-