Class CounterImpl
- java.lang.Object
-
- fish.payara.microprofile.metrics.impl.CounterImpl
-
- All Implemented Interfaces:
org.eclipse.microprofile.metrics.Counter,org.eclipse.microprofile.metrics.Counting,org.eclipse.microprofile.metrics.Metric
@Vetoed public class CounterImpl extends Object implements org.eclipse.microprofile.metrics.Counter
An incrementing and decrementing counter metric.
-
-
Constructor Summary
Constructors Constructor Description CounterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddec()Deprecated.since Payara 5.193; removed in MP Metrics 2.0voiddec(long n)Deprecated.since Payara 5.193; removed in MP Metrics 2.0longgetCount()Returns the counter's current value.voidinc()Increment the counter by one.voidinc(long n)Increment the counter byn.StringtoString()
-
-
-
Method Detail
-
inc
public void inc()
Increment the counter by one.- Specified by:
incin interfaceorg.eclipse.microprofile.metrics.Counter
-
inc
public void inc(long n)
Increment the counter byn.- Specified by:
incin interfaceorg.eclipse.microprofile.metrics.Counter- Parameters:
n- the amount by which the counter will be increased
-
dec
@Deprecated public void dec()
Deprecated.since Payara 5.193; removed in MP Metrics 2.0Decrement the counter by one.
-
dec
@Deprecated public void dec(long n)
Deprecated.since Payara 5.193; removed in MP Metrics 2.0Decrement the counter byn.- Parameters:
n- the amount by which the counter will be decreased
-
getCount
public long getCount()
Returns the counter's current value.- Specified by:
getCountin interfaceorg.eclipse.microprofile.metrics.Counter- Specified by:
getCountin interfaceorg.eclipse.microprofile.metrics.Counting- Returns:
- the counter's current value
-
-