Interface Counter

All Superinterfaces:
Counting, Metric

@ProviderType public interface Counter extends Counting, Metric
An incrementing and decrementing counter metric.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Decrement the counter by one.
    void
    decrement(long n)
    Decrement the counter by n.
    void
    Increment the counter by one.
    void
    increment(long n)
    Increment the counter by n.

    Methods inherited from interface org.apache.sling.commons.metrics.Counting

    getCount

    Methods inherited from interface org.apache.sling.commons.metrics.Metric

    adaptTo
  • Method Details

    • increment

      void increment()
      Increment the counter by one.
    • decrement

      void decrement()
      Decrement the counter by one.
    • increment

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

      void decrement(long n)
      Decrement the counter by n.
      Parameters:
      n - the amount by which the counter will be decreased