public interface Registry extends Iterable<Meter>
Modifier and Type | Method and Description |
---|---|
Clock |
clock()
The clock used by the registry for timing events.
|
Counter |
counter(Id id)
Measures the rate of some activity.
|
Id |
createId(String name)
Creates an identifier for a meter.
|
Id |
createId(String name,
Iterable<Tag> tags)
Creates an identifier for a meter.
|
DistributionSummary |
distributionSummary(Id id)
Measures the rate and variation in amount for some activity.
|
Meter |
get(Id id)
Returns the meter associated with a given id.
|
Iterator<Meter> |
iterator()
Iterator for traversing the set of meters in the registry.
|
void |
register(Meter meter)
Add a custom meter to the registry.
|
Timer |
timer(Id id)
Measures the rate and time taken for short running tasks.
|
Clock clock()
Id createId(String name)
name
- Description of the measurement that is being collected.Id createId(String name, Iterable<Tag> tags)
name
- Description of the measurement that is being collected.tags
- Other dimensions that can be used to classify the measurement.void register(Meter meter)
Counter counter(Id id)
id
- Identifier created by a call to createId(java.lang.String)
DistributionSummary distributionSummary(Id id)
id
- Identifier created by a call to createId(java.lang.String)
Timer timer(Id id)
id
- Identifier created by a call to createId(java.lang.String)
Meter get(Id id)
id
- Identifier for the meter.