Class CounterImpl

java.lang.Object
org.apache.hadoop.hbase.metrics.impl.CounterImpl
All Implemented Interfaces:
Counter, Metric

@Private public class CounterImpl extends Object implements Counter
Custom implementation of Counter using LongAdder.
  • Field Details

  • Constructor Details

  • Method Details

    • increment

      public void increment()
      Description copied from interface: Counter
      Increment this by 1.
      Specified by:
      increment in interface Counter
    • increment

      public void increment(long n)
      Description copied from interface: Counter
      Increment this by n.
      Specified by:
      increment in interface Counter
      Parameters:
      n - The amount to increment.
    • decrement

      public void decrement()
      Description copied from interface: Counter
      Decrement this by 1.
      Specified by:
      decrement in interface Counter
    • decrement

      public void decrement(long n)
      Description copied from interface: Counter
      Decrement this by n.
      Specified by:
      decrement in interface Counter
      Parameters:
      n - The amount to decrement.
    • getCount

      public long getCount()
      Description copied from interface: Counter
      Returns the current value.
      Specified by:
      getCount in interface Counter
      Returns:
      the current value.