Class GetCountOnlyCounter

java.lang.Object
io.quarkus.smallrye.metrics.runtime.GetCountOnlyCounter
All Implemented Interfaces:
org.eclipse.microprofile.metrics.Counter, org.eclipse.microprofile.metrics.Counting, org.eclipse.microprofile.metrics.Metric

public abstract class GetCountOnlyCounter extends Object implements org.eclipse.microprofile.metrics.Counter
A helper abstract class for implementing counters which only need a getCount method. Other methods throw an exception.
  • Constructor Details

    • GetCountOnlyCounter

      public GetCountOnlyCounter()
  • Method Details

    • inc

      public void inc()
      Specified by:
      inc in interface org.eclipse.microprofile.metrics.Counter
    • inc

      public void inc(long n)
      Specified by:
      inc in interface org.eclipse.microprofile.metrics.Counter
    • getCount

      public abstract long getCount()
      Specified by:
      getCount in interface org.eclipse.microprofile.metrics.Counter
      Specified by:
      getCount in interface org.eclipse.microprofile.metrics.Counting