Class JmxMetricsReporter
- java.lang.Object
-
- org.apache.solr.metrics.reporters.jmx.JmxMetricsReporter
-
- All Implemented Interfaces:
com.codahale.metrics.Reporter
,Closeable
,AutoCloseable
public class JmxMetricsReporter extends Object implements com.codahale.metrics.Reporter, Closeable
This is a modified copy of Dropwizard'sJmxReporter
and classes that it internally uses, with a few important differences:- this class knows that it can directly use
MetricsMap
as a dynamic MBean. - this class allows us to "tag" MBean instances so that we can later unregister only instances registered with the same tag.
- this class processes all metrics already existing in the registry at the time when reporter is started.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JmxMetricsReporter.Builder
Builder for theJmxMetricsReporter
class.static interface
JmxMetricsReporter.JmxCounterMBean
static interface
JmxMetricsReporter.JmxGaugeMBean
static interface
JmxMetricsReporter.JmxHistogramMBean
static interface
JmxMetricsReporter.JmxMeterMBean
static interface
JmxMetricsReporter.JmxTimerMBean
static interface
JmxMetricsReporter.MetricMBean
-
Field Summary
Fields Modifier and Type Field Description static String
INSTANCE_TAG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static JmxMetricsReporter.Builder
forRegistry(com.codahale.metrics.MetricRegistry registry)
void
start()
-
-
-
Field Detail
-
INSTANCE_TAG
public static final String INSTANCE_TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
forRegistry
public static JmxMetricsReporter.Builder forRegistry(com.codahale.metrics.MetricRegistry registry)
-
start
public void start()
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-