Class AverageRangeStatisticImpl

  • All Implemented Interfaces:
    AverageRangeStatistic, RangeStatistic, Statistic

    public class AverageRangeStatisticImpl
    extends Object
    implements AverageRangeStatistic
    An implementation of a AverageRangeStatistic. All instances of this class are immutable. Provides all the necessary accessors for properties.
    Since:
    S1AS8.1
    Version:
    1.0
    Author:
    Larry White, Kedar Mhaswade
    • Constructor Detail

      • AverageRangeStatisticImpl

        public AverageRangeStatisticImpl​(long curVal,
                                         long highMark,
                                         long lowMark,
                                         long upper,
                                         long lower,
                                         String name,
                                         String unit,
                                         String desc,
                                         long startTime,
                                         long sampleTime,
                                         long numberOfSamples,
                                         long runningTotal)
        Constructs an immutable instance of AverageRangeStatisticImpl.
        Parameters:
        curVal - The current value of this statistic
        highMark - The highest value of this statistic, since measurement started
        lowMark - The lowest value of this statistic, since measurement started
        upper - The upper limit of this statistic
        lower - The lower limit of this statistic
        name - The name of the statistic
        unit - The unit of measurement for this statistic
        desc - A brief description of the statistic
        startTime - Time in milliseconds at which the measurement was started
        sampleTime - Time at which the last measurement was done.
        numberOfSamples - number of samples at present
        runningTotal - running total of sampled data at present
      • AverageRangeStatisticImpl

        public AverageRangeStatisticImpl​(BoundedRangeStatisticImpl stats,
                                         long numberOfSamples,
                                         long runningTotal)
        Constructs an immutable instance of AverageRangeStatisticImpl.
        Parameters:
        stats - a BoundedRangeStatisticImpl
        numberOfSamples - number of samples at present
        runningTotal - running total of sampled data at present
    • Method Detail

      • getDescription

        public String getDescription()
        Description copied from interface: Statistic
        A human-readable description of the Statistic.
        Specified by:
        getDescription in interface Statistic
      • getHighWaterMark

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

        public long getLastSampleTime()
        Description copied from interface: Statistic
        The time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
        Specified by:
        getLastSampleTime in interface Statistic
      • 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
      • getName

        public String getName()
        Description copied from interface: Statistic
        The name of this Statistic.
        Specified by:
        getName in interface Statistic
      • getStartTime

        public long getStartTime()
        Description copied from interface: Statistic
        The time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
        Specified by:
        getStartTime in interface Statistic
      • getUnit

        public String getUnit()
        Description copied from interface: Statistic
        The unit of measurement for this Statistic. Valid values for TimeStatistic measurements are "HOUR", "MINUTE", "SECOND", "MILLISECOND", "MICROSECOND" and "NANOSECOND".
        Specified by:
        getUnit in interface Statistic
      • setDescription

        public void setDescription​(String desc)
        This is a hack. This method allows us to internatinalize the descriptions. See bug Id: 5045413