Class MBeanCounterImpl

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

    public class MBeanCounterImpl
    extends Object
    implements org.eclipse.microprofile.metrics.Counter
    Implementation of a counter based off an MBean. As this is just a proxy for the MBean calling the inc() method will throw an UnsupportedOperationException. Just use the getCount() method to get the value of the MBean backing this.
    • Constructor Detail

    • Method Detail

      • inc

        public void inc()
        Throws UnsupportedOperationException - this is all dealt with by the backing MBean
        Specified by:
        inc in interface org.eclipse.microprofile.metrics.Counter
      • inc

        public void inc​(long n)
        Throws UnsupportedOperationException - this is all dealt with by the backing MBean
        Specified by:
        inc in interface org.eclipse.microprofile.metrics.Counter
      • getCount

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