Class TimeStatisticImpl

java.lang.Object
org.glassfish.external.statistics.impl.StatisticImpl
org.glassfish.external.statistics.impl.TimeStatisticImpl
All Implemented Interfaces:
InvocationHandler, Statistic, TimeStatistic

public final class TimeStatisticImpl extends StatisticImpl implements TimeStatistic, InvocationHandler
  • Field Details

    • count

      private long count
    • maxTime

      private long maxTime
    • minTime

      private long minTime
    • totTime

      private long totTime
    • initCount

      private final long initCount
    • initMaxTime

      private final long initMaxTime
    • initMinTime

      private final long initMinTime
    • initTotTime

      private final long initTotTime
    • ts

      private final TimeStatistic ts
  • Constructor Details

    • TimeStatisticImpl

      public TimeStatisticImpl(long counter, long maximumTime, long minimumTime, long totalTime, String name, String unit, String desc, long startTime, long sampleTime)
  • Method Details

    • toString

      public final String toString()
      Overrides:
      toString in class StatisticImpl
    • getStatistic

      public TimeStatistic getStatistic()
    • getStaticAsMap

      public Map getStaticAsMap()
      Overrides:
      getStaticAsMap in class StatisticImpl
    • incrementCount

      public void incrementCount(long current)
    • getCount

      public long getCount()
      Returns the number of times an operation was invoked
      Specified by:
      getCount in interface TimeStatistic
    • getMaxTime

      public long getMaxTime()
      Returns the maximum amount of time that it took for one invocation of an operation, since measurement started.
      Specified by:
      getMaxTime in interface TimeStatistic
    • getMinTime

      public long getMinTime()
      Returns the minimum amount of time that it took for one invocation of an operation, since measurement started.
      Specified by:
      getMinTime in interface TimeStatistic
    • getTotalTime

      public long getTotalTime()
      Returns the amount of time that it took for all invocations, since measurement started.
      Specified by:
      getTotalTime in interface TimeStatistic
    • reset

      public void reset()
      Overrides:
      reset in class StatisticImpl
    • invoke

      public Object invoke(Object proxy, Method m, Object[] args) throws Throwable
      Specified by:
      invoke in interface InvocationHandler
      Throws:
      Throwable