[jboss-user] [JBoss Cache: Core Edition] - How to get cache size programmatically

somboss do-not-reply at jboss.com
Mon Jul 6 05:18:58 EDT 2009


Hi, I am using jboss cache core 3.1.0 and want to display cache size (the number of nodes in it). But looking at APIs, Cache doesn't support method to get this information, however this is available in CacheSPI. But I can not use this interface directly in my code as per documentation 

anonymous wrote : A reference to this interface should only be obtained when it is passed in to your code, for example when you write an CommandInterceptor or CacheLoader. You should NEVER attempt to directly cast a Cache instance to this interface. In future, the implementation may not allow it. 
  | 

As I am not using CacheLoader and I dont want to write CommandInterceptor how this can be done?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241920#4241920

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241920



More information about the jboss-user mailing list