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 . |
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()
Counter
public void increment(long amount)
Counter
amount
.public long count()
Counter
public Id id()
Meter
public double secondsSinceLastUpdate()
public Iterable<Measurement> measure()
Meter
public boolean hasExpired()
Meter
hasExpired
in interface Meter