Interface Counter

All Superinterfaces:
Metric

public interface Counter extends Metric
A count that only goes up, such as downstream_rq_total. Counters made by a registry are backed by a LongAdder, so many threads may add at once without contending; those of StatsRegistry.NOOP do nothing.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.microproxy.stats.Metric

    Metric.Type
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(long n)
    Adds n.
    void
    inc()
    Adds one.
    default Metric.Type
    Returns what kind of metric this is.
    long
    Returns the count so far.

    Methods inherited from interface org.microproxy.stats.Metric

    help, name, tagExtractedName, tags
  • Method Details

    • inc

      void inc()
      Adds one.
    • add

      void add(long n)
      Adds n.
      Parameters:
      n - how much to add, not negative
    • value

      long value()
      Returns the count so far.
      Returns:
      the count so far
    • type

      default Metric.Type type()
      Description copied from interface: Metric
      Returns what kind of metric this is.
      Specified by:
      type in interface Metric
      Returns:
      what kind of metric this is