Modifier and Type | Method and Description |
---|---|
double |
actualCount()
The cumulative count as a floating point value since this counter was last reset.
|
void |
add(double amount)
Update the counter by the specified amount.
|
static IntervalCounter |
get(Registry registry,
Id id)
Create a new instance.
|
boolean |
hasExpired()
Indicates whether the meter is expired.
|
Id |
id()
Identifier used to lookup this meter in the registry.
|
Iterable<Measurement> |
measure()
Get the set of measurements for this meter.
|
double |
secondsSinceLastUpdate()
Return the number of seconds since the last time the counter was incremented.
|
public static IntervalCounter get(Registry registry, Id id)
registry
- Registry to use.id
- Identifier for the metric being registered.public void add(double amount)
Counter
public double actualCount()
Counter
actualCount
in interface Counter
public Id id()
Meter
public double secondsSinceLastUpdate()
public Iterable<Measurement> measure()
Meter
public boolean hasExpired()
Meter
hasExpired
in interface Meter