Interface LongCounter

All Superinterfaces:
Instrument

public interface LongCounter extends Instrument
A counter for registering long measurements, only incremental.
  • Method Details

    • add

      void add(long value)
      Add a value. Should only be positive.
      Parameters:
      value -
    • getValueAsLong

      long getValueAsLong()
      Returns:
      the value for the counter.
    • getUnit

      String getUnit()
      Returns:
      the unit for this measurement.
    • getValueAsInt

      int getValueAsInt()
    • incrementAndGetAsInt

      int incrementAndGetAsInt()
      Increments the counter and gets the value as an int.
      Returns:
      the resulting value as int.
    • incrementAndGetAsLong

      long incrementAndGetAsLong()
      Increments the counter and gets the value as a long.
      Returns:
      the resulting value as long.