A read-only counter which wraps some other object that provides the counter value via a function.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.metrics.api.Meter
Meter.BaseUnits, Meter.Id, Meter.Scope, Meter.Type
-
Method Summary
-
Method Details
-
builder
Returns a builder for registering or locating a functional counter.- Type Parameters:
T
- type of the state object- Parameters:
name
- functional counter namestateObject
- object which provides the counter value on demandfn
- function which, when applied to the state object, returns the counter value- Returns:
- new builder
-
count
long count()Returns the counter value.- Returns:
- counter value
-