Interface Counter

    • Method Detail

      • 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.