Interface Counter

All Superinterfaces:
Counting, Metric

public interface Counter extends Metric, Counting
An incrementing counter metric.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the counter's current value.
    void
    inc()
    Increment the counter by one.
    void
    inc(long n)
    Increment the counter by n.
  • Method Details

    • inc

      void inc()
      Increment the counter by one.
    • inc

      void inc(long n)
      Increment the counter by n.
      Parameters:
      n - the amount by which the counter will be increased
    • getCount

      long getCount()
      Returns the counter's current value.
      Specified by:
      getCount in interface Counting
      Returns:
      the counter's current value