Interface Counter

All Superinterfaces:
Meter
All Known Implementing Classes:
DropwizardTypes.DescribableCounter

public interface Counter extends Meter
Used to measure the rate of change based on calls to increment.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Fluent builder for counters.

    Nested classes/interfaces inherited from interface org.forgerock.monitoring.api.instrument.Meter

    Meter.Id, Meter.Type
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the Builder object for this Counter.
    double
    The cumulative count since this counter was created.
    default void
    Update the counter by one.
    void
    increment(double amount)
    Update the counter by amount.
    Get a set of measurements.

    Methods inherited from interface org.forgerock.monitoring.api.instrument.Meter

    getId
  • Method Details

    • builder

      static Counter.Builder builder(String name)
      Return the Builder object for this Counter.
      Parameters:
      name - of the Counter
      Returns:
      the Builder for a Counter
    • increment

      default void increment()
      Update the counter by one.
    • increment

      void increment(double amount)
      Update the counter by amount.
      Parameters:
      amount - Amount to add to the counter.
    • count

      double count()
      The cumulative count since this counter was created.
      Returns:
      double representing the current count of the Counter
    • measure

      default Iterable<Measurement> measure()
      Description copied from interface: Meter
      Get a set of measurements. Should always return the same number of measurements and in the same order, regardless of the level of activity or the lack thereof.
      Specified by:
      measure in interface Meter
      Returns:
      The set of measurements that represents the instantaneous value of this meter.