Class MBeanCounterImpl
- java.lang.Object
-
- fish.payara.microprofile.metrics.jmx.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 theinc()
method will throw anUnsupportedOperationException
. Just use thegetCount()
method to get the value of the MBean backing this.
-
-
Constructor Summary
Constructors Constructor Description MBeanCounterImpl(MBeanExpression mBean)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCount()
void
inc()
ThrowsUnsupportedOperationException
- this is all dealt with by the backing MBeanvoid
inc(long n)
ThrowsUnsupportedOperationException
- this is all dealt with by the backing MBean
-
-
-
Constructor Detail
-
MBeanCounterImpl
public MBeanCounterImpl(MBeanExpression mBean)
-
-
Method Detail
-
inc
public void inc()
ThrowsUnsupportedOperationException
- this is all dealt with by the backing MBean- Specified by:
inc
in interfaceorg.eclipse.microprofile.metrics.Counter
-
inc
public void inc(long n)
ThrowsUnsupportedOperationException
- this is all dealt with by the backing MBean- Specified by:
inc
in interfaceorg.eclipse.microprofile.metrics.Counter
-
getCount
public long getCount()
- Specified by:
getCount
in interfaceorg.eclipse.microprofile.metrics.Counter
- Specified by:
getCount
in interfaceorg.eclipse.microprofile.metrics.Counting
-
-