Class UniformTimeValuesSnapshot

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private long[] values  
    • Constructor Summary

      Constructors 
      Constructor Description
      UniformTimeValuesSnapshot​(java.util.Collection<java.lang.Long> values, long timeInterval, java.util.concurrent.TimeUnit timeIntervalUnit)
      Create a new snapshot with the given values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getMax()
      Returns the highest value in the snapshot.
      double getMean()
      Returns the arithmetic mean of the values in the snapshot.
      long getMin()
      Returns the lowest value in the snapshot.
      double getValue​(double quantile)
      Returns the value at the given quantile.
      long[] getValues()
      Returns the entire set of values in the snapshot.
      long size()
      Returns the number of values in the snapshot.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • values

        private final long[] values
    • Constructor Detail

      • UniformTimeValuesSnapshot

        public UniformTimeValuesSnapshot​(java.util.Collection<java.lang.Long> values,
                                         long timeInterval,
                                         java.util.concurrent.TimeUnit timeIntervalUnit)
        Create a new snapshot with the given values.
        Parameters:
        values - an unordered set of values in the reservoir
        timeInterval - The time interval this snapshot relates to
        timeIntervalUnit - The time unit of the time interval
    • Method Detail

      • getValue

        public double getValue​(double quantile)
        Returns the value at the given quantile.
        Parameters:
        quantile - a given quantile, in [0..1]
        Returns:
        the value in the distribution at quantile
      • size

        public long size()
        Returns the number of values in the snapshot.
        Returns:
        the number of values
      • getValues

        public long[] getValues()
        Returns the entire set of values in the snapshot.
        Returns:
        the entire set of values
      • getMax

        public long getMax()
        Returns the highest value in the snapshot.
        Returns:
        the highest value
      • getMin

        public long getMin()
        Returns the lowest value in the snapshot.
        Returns:
        the lowest value
      • getMean

        public double getMean()
        Returns the arithmetic mean of the values in the snapshot.
        Returns:
        the arithmetic mean