Class AverageRangeStatisticImpl

  • All Implemented Interfaces:
    java.lang.reflect.InvocationHandler, AverageRangeStatistic, RangeStatistic, Statistic

    public final class AverageRangeStatisticImpl
    extends StatisticImpl
    implements AverageRangeStatistic, java.lang.reflect.InvocationHandler
    An implementation of AverageRangeStatistic that provides ways to change the state externally through mutators. Convenience class that is useful for components that gather the statistical data. By merely changing the count (which is a mandatory measurement), rest of the statistical information could be deduced.
    • Field Detail

      • currentVal

        private long currentVal
      • highWaterMark

        private long highWaterMark
      • lowWaterMark

        private long lowWaterMark
      • numberOfSamples

        private long numberOfSamples
      • runningTotal

        private long runningTotal
      • initCurrentVal

        private final long initCurrentVal
      • initHighWaterMark

        private final long initHighWaterMark
      • initLowWaterMark

        private final long initLowWaterMark
      • initNumberOfSamples

        private final long initNumberOfSamples
      • initRunningTotal

        private final long initRunningTotal
    • Constructor Detail

      • AverageRangeStatisticImpl

        public AverageRangeStatisticImpl​(long curVal,
                                         long highMark,
                                         long lowMark,
                                         java.lang.String name,
                                         java.lang.String unit,
                                         java.lang.String desc,
                                         long startTime,
                                         long sampleTime)
    • Method Detail

      • setCurrent

        public void setCurrent​(long curVal)
      • getHighWaterMark

        public long getHighWaterMark()
        Description copied from interface: RangeStatistic
        The highest value this attribute has held since the beginninYg of the measurement.
        Specified by:
        getHighWaterMark in interface RangeStatistic
      • getLowWaterMark

        public long getLowWaterMark()
        Description copied from interface: RangeStatistic
        The lowest value this attribute has held since the beginning of the measurement.
        Specified by:
        getLowWaterMark in interface RangeStatistic
      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable