codahale/metrics — Issue #161: Change JMXReporter.GaugeMBean to MXBean
Author: pron
Created: 2012-02-17 15:29:16+00:00
State: open

Sometimes gauge the callback might run a non-trivial operation that collects several data items. Instead of running the whole operation for each data item, it is preferable for the gauge to return composite data. MXBeans support composite data better than regular MBeans.

All that is required to implement this is change the name of `GaugeMBean` to `GaugeMXBean` or to annotate the type declaration with `@javax.management.MXBean`. It is a trivial code change that provides a useful functionality.