Hello all:

I am trying to monitor memory consumption for all cache objects in
Jetspeed. This is what I did and for some reason that memoryStoreSize
and calculateInMemorySize gave me zero.

This is what I did basically by using EhCache API:

import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;

CacheManager ehCacheManager=CacheManager.getInstance();
String[] cacheNames=ehCacheManager.getCacheNames();

I looped thru the names and get 6 cache object names (which matches what
defined in ehcache.xml)

preferencesCache
portletApplicationNameCache
portletDefinitionOidCache 
portletDefinitionNameCache 
portletApplicationOidCache 
portletContentCache

Then I used following

 Cache thisCache=ehCacheManager.getCache(aCacheName);
 long mss=thisCache.getMemoryStoreSize();
 long ims=thisCache.calculateInMemorySize();

to try to get memoryStoreSize and calculateInMemorySize. Both mss and
ims yield zero. What did I do wrong?  Please advise. Thank you.

---Yang

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to