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 void
dec()
Deprecated.since Payara 5.193; removed in MP Metrics 2.0void
dec(long n)
Deprecated.since Payara 5.193; removed in MP Metrics 2.0long
getCount()
Returns the counter's current value.void
inc()
Increment the counter by one.void
inc(long n)
Increment the counter byn
.String
toString()
-
-
-
Method Detail
-
inc
public void inc()
Increment the counter by one.- Specified by:
inc
in interfaceorg.eclipse.microprofile.metrics.Counter
-
inc
public void inc(long n)
Increment the counter byn
.- Specified by:
inc
in 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:
getCount
in interfaceorg.eclipse.microprofile.metrics.Counter
- Specified by:
getCount
in interfaceorg.eclipse.microprofile.metrics.Counting
- Returns:
- the counter's current value
-
-