Package org.microproxy.stats
Interface Counter
- All Superinterfaces:
Metric
A count that only goes up, such as
downstream_rq_total. Counters made by a registry are
backed by a LongAdder, so many threads may add at once
without contending; those of StatsRegistry.NOOP do nothing.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.microproxy.stats.Metric
Metric.Type -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long n) Addsn.voidinc()Adds one.default Metric.Typetype()Returns what kind of metric this is.longvalue()Returns the count so far.Methods inherited from interface org.microproxy.stats.Metric
help, name, tagExtractedName, tags
-
Method Details
-
inc
void inc()Adds one. -
add
void add(long n) Addsn.- Parameters:
n- how much to add, not negative
-
value
long value()Returns the count so far.- Returns:
- the count so far
-
type
Description copied from interface:MetricReturns what kind of metric this is.
-