[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
EHCache 2.7 cache statistics clearing and deactivating  XML
Forum Index -> Ehcache
Author Message
bhillou

journeyman

Joined: 02/28/2008 23:59:53
Messages: 14
Offline


Hello,

In the new EHCache 2.7 API I don't understand how to perform the following operations:

- clear the statistics (previously accessible through the Cache.clearStatistics() call)
- enable/disable the statistics (cache.setStatisticsEnabled(boolean)).

I checked the JMX beans I couldn't find anything there anymore. I saw there is a method to disable the statistics temporarily but does this imply that statistics no longer have a performance impact and can be left on even for production environments ?

Thanks for any help with this, I must say I was a bit confused as I couldn't find any information in the Javadoc.

Best regards,
Serge Huber.
cdennis

master

Joined: 01/19/2009 10:03:26
Messages: 89
Offline

The quick answers to your questions are:

1. You can't clear statistics anymore. This may mean you need to take baselines.
2. Statistics get enabled as and when you use them. If you stop looking at them they then disable themselves after a configurable delay (defaults to 5 minutes).

Overall the statistics have a much lower overhead than they had in the past, and you also only incur the overhead of the statistics that you use, instead of the overhead of all statistics.

We are aware that there isn't much documentation on the new statistics features, and it's something that our documentation team should be working on soon.

Hope that all makes sense!

Chris Dennis (Terracotta Engineer)
bhillou

journeyman

Joined: 02/28/2008 23:59:53
Messages: 14
Offline

Hello Chris,

Thank you so much for your quick and precise answer. This makes perfect sense and is all I needed.

Best regards,
Serge Huber.
bhillou

journeyman

Joined: 02/28/2008 23:59:53
Messages: 14
Offline


Actually I did have one follow-up question:

Was it deliberate that all the methods in the StatisticsGateway class are not JavaBean compliant, especially the getters ? I had a JSP I was using to display the stats using older EHCache versions and I could directly use the Statistics class in the expression language. With the new StatisticsGateway class this is no longer possible and I have to write my own wrapper bean around it, which was a bit tedious since there are a lot of accessors.

I am aware that there is also a JMX interface but it doesn't expose as much information and I was trying to avoid going through the JMX server just for this.

Best regards,
Serge Huber.
cdennis

master

Joined: 01/19/2009 10:03:26
Messages: 89
Offline

No, it wasn't intentional, just not something we considered. Sorry!

Chris Dennis (Terracotta Engineer)
bhillou

journeyman

Joined: 02/28/2008 23:59:53
Messages: 14
Offline

Hello Chris,

Ok thanks for your frank and quick reply. Do you think it will be modified or maybe it's better to stabilize the API for a few releases ?

Best regards,
Serge Huber.
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team