| Modifier and Type | Method and Description |
|---|---|
long |
count()
The cumulative count since this counter was created.
|
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.
|
void |
increment()
Update the counter by one.
|
void |
increment(long amount)
Update the counter by
amount. |
java.lang.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 increment()
Counterpublic void increment(long amount)
Counteramount.public long count()
Counterpublic Id id()
Meterpublic double secondsSinceLastUpdate()
public java.lang.Iterable<Measurement> measure()
Meterpublic boolean hasExpired()
MeterhasExpired in interface Meter