public class NuxeoMetricSet extends Object implements com.codahale.metrics.MetricSet
MetricSet
with th ease of Java 8 Lambda expression.Modifier and Type | Field and Description |
---|---|
protected Map<String,com.codahale.metrics.Metric> |
metrics |
protected String |
prefixName |
Constructor and Description |
---|
NuxeoMetricSet() |
NuxeoMetricSet(String name,
String... names) |
NuxeoMetricSet(Supplier<Map<String,com.codahale.metrics.Metric>> metricsSupplier,
String name,
String... names) |
Modifier and Type | Method and Description |
---|---|
protected String |
buildNameWithPrefix(String name,
String[] names) |
Set<String> |
getMetricNames() |
Map<String,com.codahale.metrics.Metric> |
getMetrics() |
String |
getPrefixName() |
<T> void |
putGauge(com.codahale.metrics.Gauge<T> gauge,
String name,
String... names)
Put a gauge inside this
MetricSet as name prefixName.name.names[0].names[1]... ; |
protected final String prefixName
public NuxeoMetricSet()
public NuxeoMetricSet(String name, String... names)
public <T> void putGauge(com.codahale.metrics.Gauge<T> gauge, String name, String... names)
MetricSet
as name prefixName.name.names[0].names[1]...
;protected String buildNameWithPrefix(String name, String[] names)
MetricRegistry.name(String, String...)
prefixed with this
NuxeoMetricSet
's prefixpublic Map<String,com.codahale.metrics.Metric> getMetrics()
getMetrics
in interface com.codahale.metrics.MetricSet
public String getPrefixName()
MetricSet
to prefix all added metrics, the value could be emptypublic Set<String> getMetricNames()
MetricSet
Copyright © 2019 Nuxeo. All rights reserved.