Interface Counter

All Known Implementing Classes:
LongAdderCounter, NullStatsLogger.NullCounter, OtelCounter, ThreadScopedLongAdderCounter

public interface Counter
Simple stats that require only increment and decrement functions on a Long. Metrics like the number of topics, persist queue size etc. should use this.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCount(long delta)
    Add delta to the value associated with this stat.
    void
    addLatency(long eventLatency, TimeUnit unit)
    An operation succeeded with the given eventLatency.
    void
    Clear this stat.
    void
    dec()
    Decrement the value associated with this stat.
    get()
    Get the value associated with this stat.
    void
    inc()
    Increment the value associated with this stat.
  • Method Details

    • clear

      void clear()
      Clear this stat.
    • inc

      void inc()
      Increment the value associated with this stat.
    • dec

      void dec()
      Decrement the value associated with this stat.
    • addCount

      void addCount(long delta)
      Add delta to the value associated with this stat.
      Parameters:
      delta -
    • addLatency

      void addLatency(long eventLatency, TimeUnit unit)
      An operation succeeded with the given eventLatency. Update stats to reflect the same
      Parameters:
      eventLatency - The event latency
      unit -
    • get

      Long get()
      Get the value associated with this stat.