Package org.jgroups.util
Class AverageMinMax
java.lang.Object
org.jgroups.util.Average
org.jgroups.util.AverageMinMax
- All Implemented Interfaces:
Streamable
Measures min and max in addition to average
- Since:
- 4.0, 3.6.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected longprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Average>
Tadd(long num) voidclear()longmax()<T extends Average>
Tmerge(T other) Merges this average with another onelongmin()longp(double percentile) longpercentile(double percentile) voidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedsort()doublestddev()toString()booleanusePercentiles(int cap) values()voidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.
-
Field Details
-
min
protected long min -
max
protected long max -
values
-
sorted
protected volatile boolean sorted
-
-
Constructor Details
-
AverageMinMax
public AverageMinMax()
-
-
Method Details
-
min
public long min() -
max
public long max() -
usePercentiles
public boolean usePercentiles() -
usePercentiles
-
values
-
add
-
merge
Description copied from class:AverageMerges this average with another one -
clear
public void clear() -
percentiles
-
toString
-
toString
-
writeTo
Description copied from interface:StreamableWrite the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Specified by:
writeToin interfaceStreamable- Overrides:
writeToin classAverage- Throws:
IOException
-
readFrom
Description copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classAverage- Throws:
IOException
-
percentile
public long percentile(double percentile) -
p
public long p(double percentile) -
stddev
public double stddev() -
sort
-