|
|
|
Hit/Miss/Expired-statistics can be based on http://wiki.opensymphony.com/display/CACHE/Statistics
Based on the code in http://wiki.opensymphony.com/display/CACHE/Statistics, it is fairly easy to expose the stats as attributes, which would be a start. Maybe make something like the way org.hibernate.jmx.StatisticsService is done, so you can choose to enable/disable statistics (with them disabled by default). I'd be happy to create a patch and do some doco on using it if people are interested.
Looks like the stats are already collected by:
CacheMapAccessEventListenerImpl CacheEntryEventListenerImpl ScopeEventListenerImpl All that remains is to work out a way of getting a reference to those classes so they can be exposed via JMX. JMX version of StatisticListenerImpl.java example. This version uses static counters so that a reference to the listener is not needed. This enables the stats to be accessed the same way regardless of how oscache is integrated. Please see the attachment "StatisticListenerImpl JMX Spring Notes.txt" for notes on how to integrate this with Spring JMX.
Notes on how to expose the OsCache statistics via JMX.
Thanks for the source code and the infos.
The JMX Monitor class is available by the current SVN revision 403.
Christoph, can you improve or enhance the wiki documentation http://wiki.opensymphony.com/display/CACHE/JMX+Monitoring ?
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
http://jira.opensymphony.com/browse/CACHE-21
However this request goes further and asks specifically for JMX.