Class MeterImpl

  • All Implemented Interfaces:
    org.eclipse.microprofile.metrics.Counting, org.eclipse.microprofile.metrics.Meter, org.eclipse.microprofile.metrics.Metered, org.eclipse.microprofile.metrics.Metric

    @Vetoed
    public class MeterImpl
    extends Object
    implements org.eclipse.microprofile.metrics.Meter
    A meter metric which measures mean throughput and one-, five-, and fifteen-minute exponentially-weighted moving average throughputs.
    See Also:
    ExponentiallyWeightedMovingAverage
    • Constructor Detail

      • MeterImpl

        public MeterImpl()
        Creates a new MeterImpl.
      • MeterImpl

        public MeterImpl​(Clock clock)
        Creates a new MeterImpl.
        Parameters:
        clock - the clock to use for the meter ticks
    • Method Detail

      • mark

        public void mark()
        Mark the occurrence of an event.
        Specified by:
        mark in interface org.eclipse.microprofile.metrics.Meter
      • mark

        public void mark​(long n)
        Mark the occurrence of a given number of events.
        Specified by:
        mark in interface org.eclipse.microprofile.metrics.Meter
        Parameters:
        n - the number of events
      • getCount

        public long getCount()
        Specified by:
        getCount in interface org.eclipse.microprofile.metrics.Counting
        Specified by:
        getCount in interface org.eclipse.microprofile.metrics.Meter
        Specified by:
        getCount in interface org.eclipse.microprofile.metrics.Metered
      • getFifteenMinuteRate

        public double getFifteenMinuteRate()
        Specified by:
        getFifteenMinuteRate in interface org.eclipse.microprofile.metrics.Meter
        Specified by:
        getFifteenMinuteRate in interface org.eclipse.microprofile.metrics.Metered
      • getFiveMinuteRate

        public double getFiveMinuteRate()
        Specified by:
        getFiveMinuteRate in interface org.eclipse.microprofile.metrics.Meter
        Specified by:
        getFiveMinuteRate in interface org.eclipse.microprofile.metrics.Metered
      • getMeanRate

        public double getMeanRate()
        Specified by:
        getMeanRate in interface org.eclipse.microprofile.metrics.Meter
        Specified by:
        getMeanRate in interface org.eclipse.microprofile.metrics.Metered
      • getOneMinuteRate

        public double getOneMinuteRate()
        Specified by:
        getOneMinuteRate in interface org.eclipse.microprofile.metrics.Meter
        Specified by:
        getOneMinuteRate in interface org.eclipse.microprofile.metrics.Metered