|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yammer.metrics.reporting.AbstractReporter
com.yammer.metrics.reporting.JmxReporter
public class JmxReporter
A reporter which exposes application metric as JMX MBeans.
| Nested Class Summary | |
|---|---|
static interface |
JmxReporter.CounterMBean
|
static interface |
JmxReporter.GaugeMBean
|
static interface |
JmxReporter.HistogramMBean
|
static interface |
JmxReporter.MeterMBean
|
static interface |
JmxReporter.MetricMBean
|
static interface |
JmxReporter.TimerMBean
|
| Constructor Summary | |
|---|---|
JmxReporter(MetricsRegistry registry)
Creates a new JmxReporter for the given registry. |
|
| Method Summary | |
|---|---|
static JmxReporter |
getDefault()
Returns the default instance of JmxReporter if it has been started. |
void |
onMetricAdded(MetricName name,
Metric metric)
Called when a metric has been added to the MetricsRegistry. |
void |
onMetricRemoved(MetricName name)
Called when a metric has been removed from the MetricsRegistry. |
void |
processCounter(MetricName name,
Counter counter,
com.yammer.metrics.reporting.JmxReporter.Context context)
Process the given counter. |
void |
processGauge(MetricName name,
Gauge<?> gauge,
com.yammer.metrics.reporting.JmxReporter.Context context)
Process the given gauge. |
void |
processHistogram(MetricName name,
Histogram histogram,
com.yammer.metrics.reporting.JmxReporter.Context context)
Process the given histogram. |
void |
processMeter(MetricName name,
Metered meter,
com.yammer.metrics.reporting.JmxReporter.Context context)
Process the given Metered instance. |
void |
processTimer(MetricName name,
Timer timer,
com.yammer.metrics.reporting.JmxReporter.Context context)
Process the given timer. |
void |
shutdown()
Stops the reporter and closes any internal resources. |
static void |
shutdownDefault()
Stops the default instance of JmxReporter. |
void |
start()
Starts the reporter. |
static void |
startDefault(MetricsRegistry registry)
Starts the default instance of JmxReporter. |
| Methods inherited from class com.yammer.metrics.reporting.AbstractReporter |
|---|
getMetricsRegistry |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JmxReporter(MetricsRegistry registry)
JmxReporter for the given registry.
registry - a MetricsRegistry| Method Detail |
|---|
public static void startDefault(MetricsRegistry registry)
JmxReporter.
registry - the MetricsRegistry to report frompublic static JmxReporter getDefault()
JmxReporter if it has been started.
public static void shutdownDefault()
JmxReporter.
public void onMetricAdded(MetricName name,
Metric metric)
MetricsRegistryListenerMetricsRegistry.
onMetricAdded in interface MetricsRegistryListenername - the name of the Metricmetric - the Metricpublic void onMetricRemoved(MetricName name)
MetricsRegistryListenerMetricsRegistry.
onMetricRemoved in interface MetricsRegistryListenername - the name of the Metric
public void processMeter(MetricName name,
Metered meter,
com.yammer.metrics.reporting.JmxReporter.Context context)
throws Exception
MetricProcessorMetered instance.
processMeter in interface MetricProcessor<com.yammer.metrics.reporting.JmxReporter.Context>name - the name of the metermeter - the metercontext - the context of the meter
Exception - if something goes wrong
public void processCounter(MetricName name,
Counter counter,
com.yammer.metrics.reporting.JmxReporter.Context context)
throws Exception
MetricProcessor
processCounter in interface MetricProcessor<com.yammer.metrics.reporting.JmxReporter.Context>name - the name of the countercounter - the countercontext - the context of the meter
Exception - if something goes wrong
public void processHistogram(MetricName name,
Histogram histogram,
com.yammer.metrics.reporting.JmxReporter.Context context)
throws Exception
MetricProcessor
processHistogram in interface MetricProcessor<com.yammer.metrics.reporting.JmxReporter.Context>name - the name of the histogramhistogram - the histogramcontext - the context of the meter
Exception - if something goes wrong
public void processTimer(MetricName name,
Timer timer,
com.yammer.metrics.reporting.JmxReporter.Context context)
throws Exception
MetricProcessor
processTimer in interface MetricProcessor<com.yammer.metrics.reporting.JmxReporter.Context>name - the name of the timertimer - the timercontext - the context of the meter
Exception - if something goes wrong
public void processGauge(MetricName name,
Gauge<?> gauge,
com.yammer.metrics.reporting.JmxReporter.Context context)
throws Exception
MetricProcessor
processGauge in interface MetricProcessor<com.yammer.metrics.reporting.JmxReporter.Context>name - the name of the gaugegauge - the gaugecontext - the context of the meter
Exception - if something goes wrongpublic void shutdown()
AbstractReporter
shutdown in class AbstractReporterpublic final void start()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||