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'sJmxReporterand classes that it internally uses, with a few important differences:- this class knows that it can directly use
MetricsMapas 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 classJmxMetricsReporter.BuilderBuilder for theJmxMetricsReporterclass.static interfaceJmxMetricsReporter.JmxCounterMBeanstatic interfaceJmxMetricsReporter.JmxGaugeMBeanstatic interfaceJmxMetricsReporter.JmxHistogramMBeanstatic interfaceJmxMetricsReporter.JmxMeterMBeanstatic interfaceJmxMetricsReporter.JmxTimerMBeanstatic interfaceJmxMetricsReporter.MetricMBean
-
Field Summary
Fields Modifier and Type Field Description static StringINSTANCE_TAG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static JmxMetricsReporter.BuilderforRegistry(com.codahale.metrics.MetricRegistry registry)voidstart()
-
-
-
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-