public class DropwizardMeterRegistry extends AbstractMeterRegistry
AbstractMeterRegistry.ConfigImpl
MeterRegistry.Config, MeterRegistry.More
Constructor and Description |
---|
DropwizardMeterRegistry(Clock clock)
Constructor for this class.
|
DropwizardMeterRegistry(Clock clock,
Supplier<com.codahale.metrics.Reservoir> newReservoirSupplier)
Constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
protected HistogramConfig |
defaultHistogramConfig()
Every custom registry implementation should define a default histogram expiry.
|
protected TimeUnit |
getBaseTimeUnit()
The registry's base TimeUnit.
|
protected Counter |
newCounter(Meter.Id id)
Build a new counter to be added to the registry.
|
protected DistributionSummary |
newDistributionSummary(Meter.Id id,
HistogramConfig histogramConfig)
Build a new distribution summary to be added to the registry.
|
protected <T> Gauge |
newGauge(Meter.Id id,
T obj,
ToDoubleFunction<T> valueFunction)
Build a new gauge to be added to the registry.
|
protected Meter |
newMeter(Meter.Id id,
Meter.Type type,
Iterable<Measurement> measurements)
Build a new custom meter to be added to the registry.
|
protected Timer |
newTimer(Meter.Id id,
HistogramConfig histogramConfig,
PauseDetector pauseDetector)
Build a new timer to be added to the registry.
|
config, counter, deregisterMatching, gauge, getMeters, more, newTimeGauge, register, summary, timer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
find, forEachMeter, get
public DropwizardMeterRegistry(Clock clock)
clock
- the clockprotected <T> Gauge newGauge(Meter.Id id, T obj, ToDoubleFunction<T> valueFunction)
AbstractMeterRegistry
newGauge
in class AbstractMeterRegistry
T
- The type of the state object from which the gauge value is extracted.id
- The id that uniquely identifies the gauge.obj
- State object used to compute a value.valueFunction
- Function that is applied on the value for the number.protected Counter newCounter(Meter.Id id)
AbstractMeterRegistry
newCounter
in class AbstractMeterRegistry
id
- The id that uniquely identifies the counter.protected Timer newTimer(Meter.Id id, HistogramConfig histogramConfig, PauseDetector pauseDetector)
AbstractMeterRegistry
newTimer
in class AbstractMeterRegistry
id
- The id that uniquely identifies the timer.histogramConfig
- the configuration for the histogram.pauseDetector
- the pause detector.protected DistributionSummary newDistributionSummary(Meter.Id id, HistogramConfig histogramConfig)
AbstractMeterRegistry
newDistributionSummary
in class AbstractMeterRegistry
id
- The id that uniquely identifies the distribution summary.histogramConfig
- the configuration for the histogram.protected Meter newMeter(Meter.Id id, Meter.Type type, Iterable<Measurement> measurements)
AbstractMeterRegistry
newMeter
in class AbstractMeterRegistry
id
- The id that uniquely identifies the custom meter.type
- The type of meter.measurements
- the measurements.protected TimeUnit getBaseTimeUnit()
AbstractMeterRegistry
getBaseTimeUnit
in class AbstractMeterRegistry
protected HistogramConfig defaultHistogramConfig()
AbstractMeterRegistry
histogramConfig.builder().histogramExpiry(defaultStep).build().merge(HistogramConfig.DEFAULT);
defaultHistogramConfig
in class AbstractMeterRegistry
Copyright 2011-2017 ForgeRock AS.