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

public class NuxeoMetricSet extends Object implements io.dropwizard.metrics5.MetricSet
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

    Fields
    Modifier and Type
    Field
    Description
    protected final Map<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Metric>
     
    protected final io.dropwizard.metrics5.MetricName
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    NuxeoMetricSet(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 Type
    Method
    Description
    Set<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 this MetricSet as name prefixName.name.names[0].names[1]...;
    <T> void
    putGauge(io.dropwizard.metrics5.Gauge<T> gauge, String name, String... names)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • metrics

      protected final Map<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Metric> metrics
    • prefixName

      protected final io.dropwizard.metrics5.MetricName prefixName
  • Constructor Details

    • NuxeoMetricSet

      public NuxeoMetricSet()
    • NuxeoMetricSet

      public NuxeoMetricSet(String name, String... names)
    • NuxeoMetricSet

      public NuxeoMetricSet(io.dropwizard.metrics5.MetricName name)
    • NuxeoMetricSet

      public NuxeoMetricSet(Supplier<Map<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Metric>> metricsSupplier, io.dropwizard.metrics5.MetricName name)
  • Method Details

    • putGauge

      public <T> void putGauge(io.dropwizard.metrics5.Gauge<T> gauge, io.dropwizard.metrics5.MetricName name)
      Put a gauge inside this MetricSet as name prefixName.name.names[0].names[1]...;
    • putGauge

      public <T> void putGauge(io.dropwizard.metrics5.Gauge<T> gauge, String name, String... names)
    • getMetrics

      public Map<io.dropwizard.metrics5.MetricName,io.dropwizard.metrics5.Metric> getMetrics()
      Specified by:
      getMetrics in interface io.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

      public Set<io.dropwizard.metrics5.MetricName> getMetricNames()
      Returns:
      all metric names registered into this MetricSet