Class SimpleStats

    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleStats​(java.util.concurrent.atomic.AtomicLong statsHolder, SimpleStats.Type type)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dec()
      Decrement the counter by one.
      void dec​(long n)
      Decrement the counter by n.
      long getCount()
      Returns the current count.
      void inc()
      Increment the counter by one.
      void inc​(long n)
      Increment the counter by n.
      void mark()
      Mark the occurrence of an event.
      void mark​(long n)
      Mark the occurrence of a given number of events.
      TimerStats.Context time()
      Returns a new TimerStats.Context.
      void update​(long value)
      Adds a recorded value.
      void update​(long duration, java.util.concurrent.TimeUnit unit)
      Adds a recorded duration.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleStats

        public SimpleStats​(java.util.concurrent.atomic.AtomicLong statsHolder,
                           SimpleStats.Type type)
    • Method Detail

      • getCount

        public long getCount()
        Description copied from interface: Counting
        Returns the current count.
        Specified by:
        getCount in interface Counting
        Returns:
        the current count
      • inc

        public void inc()
        Description copied from interface: CounterStats
        Increment the counter by one.
        Specified by:
        inc in interface CounterStats
      • dec

        public void dec()
        Description copied from interface: CounterStats
        Decrement the counter by one.
        Specified by:
        dec in interface CounterStats
      • inc

        public void inc​(long n)
        Description copied from interface: CounterStats
        Increment the counter by n.
        Specified by:
        inc in interface CounterStats
        Parameters:
        n - the amount by which the counter will be increased
      • dec

        public void dec​(long n)
        Description copied from interface: CounterStats
        Decrement the counter by n.
        Specified by:
        dec in interface CounterStats
        Parameters:
        n - the amount by which the counter will be decreased
      • mark

        public void mark()
        Description copied from interface: MeterStats
        Mark the occurrence of an event.
        Specified by:
        mark in interface MeterStats
      • mark

        public void mark​(long n)
        Description copied from interface: MeterStats
        Mark the occurrence of a given number of events.
        Specified by:
        mark in interface MeterStats
        Parameters:
        n - the number of events
      • update

        public void update​(long duration,
                           java.util.concurrent.TimeUnit unit)
        Description copied from interface: TimerStats
        Adds a recorded duration.
        Specified by:
        update in interface TimerStats
        Parameters:
        duration - the length of the duration
        unit - the scale unit of duration
      • update

        public void update​(long value)
        Description copied from interface: HistogramStats
        Adds a recorded value.
        Specified by:
        update in interface HistogramStats
        Parameters:
        value - the length of the value