| 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)
Counterpublic double actualCount()
CounteractualCount in interface Counterpublic Id id()
Meterpublic double secondsSinceLastUpdate()
public Iterable<Measurement> measure()
Meterpublic boolean hasExpired()
MeterhasExpired in interface Meter