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
  • Field Details

    • min

      protected long min
    • max

      protected long max
    • values

      protected List<Long> 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

      public AverageMinMax usePercentiles(int cap)
    • values

      public List<Long> values()
    • add

      public <T extends Average> T add(long num)
      Overrides:
      add in class Average
    • merge

      public <T extends Average> T merge(T other)
      Description copied from class: Average
      Merges this average with another one
      Overrides:
      merge in class Average
    • clear

      public void clear()
      Overrides:
      clear in class Average
    • percentiles

      public String percentiles()
    • toString

      public String toString()
      Overrides:
      toString in class Average
    • toString

      public String toString(TimeUnit u)
      Overrides:
      toString in class Average
    • writeTo

      public void writeTo(DataOutput out) throws 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 interface Streamable
      Overrides:
      writeTo in class Average
      Throws:
      IOException
    • readFrom

      public void readFrom(DataInput in) throws 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 interface Streamable
      Overrides:
      readFrom in class Average
      Throws:
      IOException
    • percentile

      public long percentile(double percentile)
    • p

      public long p(double percentile)
    • stddev

      public double stddev()
    • sort

      public AverageMinMax sort()