public final class NoopRegistry extends java.lang.Object implements Registry
Constructor and Description |
---|
NoopRegistry() |
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(java.lang.String name)
Creates an identifier for a meter.
|
Id |
createId(java.lang.String name,
java.lang.Iterable<Tag> tags)
Creates an identifier for a meter.
|
DistributionSummary |
distributionSummary(Id id)
Measures the rate and variation in amount for some activity.
|
Gauge |
gauge(Id id)
Represents a value sampled from another source.
|
Meter |
get(Id id)
Returns the meter associated with a given id.
|
java.util.Iterator<Meter> |
iterator()
Iterator for traversing the set of meters in the registry.
|
void |
register(Meter meter)
Register a passive gauge.
|
java.util.concurrent.ConcurrentMap<Id,java.lang.Object> |
state()
Returns a map that can be used to associate state with the registry.
|
Timer |
timer(Id id)
Measures the rate and time taken for short running tasks.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
collectionSize, collectionSize, config, counter, counter, counter, counters, createId, createId, distributionSummaries, distributionSummary, distributionSummary, distributionSummary, gauge, gauge, gauge, gauge, gauge, gauge, gauge, gauge, gauges, longTaskTimer, longTaskTimer, longTaskTimer, longTaskTimer, mapSize, mapSize, methodValue, methodValue, propagate, propagate, stream, timer, timer, timer, timers, underlying
public Clock clock()
Registry
public Id createId(java.lang.String name)
Registry
public Id createId(java.lang.String name, java.lang.Iterable<Tag> tags)
Registry
public void register(Meter meter)
Registry
register
in interface Registry
Registry.gauge(Id, Number)
,
Registry.gauge(Id, Object, ToDoubleFunction)
,
Registry.collectionSize(Id, Collection)
,
Registry.mapSize(Id, Map)
public java.util.concurrent.ConcurrentMap<Id,java.lang.Object> state()
Registry
LongTaskTimer
.public Counter counter(Id id)
Registry
counter
in interface Registry
id
- Identifier created by a call to Registry.createId(java.lang.String)
public DistributionSummary distributionSummary(Id id)
Registry
distributionSummary
in interface Registry
id
- Identifier created by a call to Registry.createId(java.lang.String)
public Timer timer(Id id)
Registry
timer
in interface Registry
id
- Identifier created by a call to Registry.createId(java.lang.String)
public Gauge gauge(Id id)
Registry
Gauge.set(double)
.
Registry implementations are free to expire the gauge if it has not been updated in the
last minute. If you do not want to worry about the sampling, then use PolledMeter
instead.gauge
in interface Registry
id
- Identifier created by a call to Registry.createId(java.lang.String)
public Meter get(Id id)
Registry