Package org.jgroups.util
Class AverageMinMax
- java.lang.Object
-
- org.jgroups.util.Average
-
- org.jgroups.util.AverageMinMax
-
- All Implemented Interfaces:
Streamable
public class AverageMinMax extends Average
Measures min and max in addition to average- Since:
- 4.0, 3.6.10
- Author:
- Bela Ban
-
-
Constructor Summary
Constructors Constructor Description AverageMinMax()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Average>
Tadd(long num)
void
clear()
long
max()
<T extends Average>
Tmerge(T other)
Merges this average with another onelong
min()
protected long
p(double percentile)
java.lang.String
percentiles()
void
readFrom(java.io.DataInput in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closedprotected double
stddev()
java.lang.String
toString()
boolean
usePercentiles()
AverageMinMax
usePercentiles(int capacity)
void
writeTo(java.io.DataOutput out)
Write the entire state of the current object (including superclasses) to outstream.-
Methods inherited from class org.jgroups.util.Average
average, count, getAverage, getCount
-
-
-
-
Method Detail
-
min
public long min()
-
max
public long max()
-
usePercentiles
public boolean usePercentiles()
-
usePercentiles
public AverageMinMax usePercentiles(int capacity)
-
merge
public <T extends Average> T merge(T other)
Description copied from class:Average
Merges this average with another one
-
percentiles
public java.lang.String percentiles()
-
p
protected long p(double percentile)
-
stddev
protected double stddev()
-
writeTo
public void writeTo(java.io.DataOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Specified by:
writeTo
in interfaceStreamable
- Overrides:
writeTo
in classAverage
- Throws:
java.io.IOException
-
readFrom
public void readFrom(java.io.DataInput in) throws java.io.IOException
Description copied from interface:Streamable
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classAverage
- Throws:
java.io.IOException
-
-