portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sie, Yang" <yang....@fmr.com>
Subject Jetspeed Cache Question
Date Mon, 05 Nov 2007 20:27:41 GMT
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: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Mime
View raw message