Package org.nuxeo.runtime.metrics
Class NuxeoMetricSet
java.lang.Object
org.nuxeo.runtime.metrics.NuxeoMetricSet
- All Implemented Interfaces:
io.dropwizard.metrics5.Metric
,io.dropwizard.metrics5.MetricSet
- Direct Known Subclasses:
GuavaCacheMetric
Just a helper to easily declare metrics inside a
MetricSet
with th ease of Java 8 Lambda expression.- Since:
- 8.10-HF08, 9.2
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<io.dropwizard.metrics5.MetricName,
io.dropwizard.metrics5.Metric> protected final io.dropwizard.metrics5.MetricName
-
Constructor Summary
ConstructorDescriptionNuxeoMetricSet
(io.dropwizard.metrics5.MetricName name) NuxeoMetricSet
(String name, String... names) NuxeoMetricSet
(Supplier<Map<io.dropwizard.metrics5.MetricName, io.dropwizard.metrics5.Metric>> metricsSupplier, io.dropwizard.metrics5.MetricName name) -
Method Summary
Modifier and TypeMethodDescriptionSet<io.dropwizard.metrics5.MetricName>
Map<io.dropwizard.metrics5.MetricName,
io.dropwizard.metrics5.Metric> io.dropwizard.metrics5.MetricName
<T> void
putGauge
(io.dropwizard.metrics5.Gauge<T> gauge, io.dropwizard.metrics5.MetricName name) Put a gauge inside thisMetricSet
as nameprefixName.name.names[0].names[1]...
;<T> void
-
Field Details
-
metrics
-
prefixName
protected final io.dropwizard.metrics5.MetricName prefixName
-
-
Constructor Details
-
NuxeoMetricSet
public NuxeoMetricSet() -
NuxeoMetricSet
-
NuxeoMetricSet
public NuxeoMetricSet(io.dropwizard.metrics5.MetricName name) -
NuxeoMetricSet
-
-
Method Details
-
putGauge
public <T> void putGauge(io.dropwizard.metrics5.Gauge<T> gauge, io.dropwizard.metrics5.MetricName name) Put a gauge inside thisMetricSet
as nameprefixName.name.names[0].names[1]...
; -
putGauge
-
getMetrics
- Specified by:
getMetrics
in interfaceio.dropwizard.metrics5.MetricSet
-
getPrefixName
public io.dropwizard.metrics5.MetricName getPrefixName()- Returns:
- the prefix name used by this
MetricSet
to prefix all added metrics, the value could be empty
-
getMetricNames
- Returns:
- all metric names registered into this
MetricSet
-