Class StatisticImpl

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected StatisticImpl​(java.lang.String name, java.lang.String unit, java.lang.String desc)  
      protected StatisticImpl​(java.lang.String name, java.lang.String unit, java.lang.String desc, long start_time, long sample_time)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkMethod​(java.lang.reflect.Method method)  
      java.lang.String getDescription()
      A human-readable description of the Statistic.
      long getLastSampleTime()
      The time of the last measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
      java.lang.String getName()
      The name of this Statistic.
      long getStartTime()
      The time of the first measurement represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
      java.util.Map getStaticAsMap()  
      java.lang.String getUnit()
      The unit of measurement for this Statistic.
      protected static boolean isValidString​(java.lang.String str)  
      void reset()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • statisticName

        private final java.lang.String statisticName
      • statisticUnit

        private final java.lang.String statisticUnit
      • statisticDesc

        private final java.lang.String statisticDesc
      • sampleTime

        protected long sampleTime
      • startTime

        private long startTime
      • UNIT_MILLISECOND

        public static final java.lang.String UNIT_MILLISECOND
        See Also:
        Constant Field Values
      • UNIT_MICROSECOND

        public static final java.lang.String UNIT_MICROSECOND
        See Also:
        Constant Field Values
      • LAST_SAMPLE_TIME

        public static final java.lang.String LAST_SAMPLE_TIME
        See Also:
        Constant Field Values
      • statMap

        protected final java.util.Map<java.lang.String,​java.lang.Object> statMap
      • NEWLINE

        protected static final java.lang.String NEWLINE
    • Constructor Detail

      • StatisticImpl

        protected StatisticImpl​(java.lang.String name,
                                java.lang.String unit,
                                java.lang.String desc,
                                long start_time,
                                long sample_time)
      • StatisticImpl

        protected StatisticImpl​(java.lang.String name,
                                java.lang.String unit,
                                java.lang.String desc)
    • Method Detail

      • getStaticAsMap

        public java.util.Map getStaticAsMap()
      • getName

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

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

        public java.lang.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
      • 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
      • 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
      • reset

        public void reset()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isValidString

        protected static boolean isValidString​(java.lang.String str)
      • checkMethod

        protected void checkMethod​(java.lang.reflect.Method method)