Hi Saravanan,

maybe you can help me.

I've written a test for the implementation of the Clearable interface  
for ConcurrentHashMap:
http://svn.terracotta.org/fisheye/browse/Terracotta/dso/branches/2.5/ 
code/base/dso-tests-jdk15/tests.system/com/tctest/ 
ConcurrentHashMapTestApp.java?r=6091#l767

I based my implementation of the Clearable interface on what is done  
in HashMapTC, and thus perform a check on each entry value to see if  
Cacheable.recentlyAccessed() returns true. If it does, the value  
isn't cleared:
http://svn.terracotta.org/fisheye/browse/Terracotta/dso/branches/2.5/ 
code/base/dso-l1-jdk15/src/java/util/concurrent/ 
ConcurrentHashMapTC.java?r=6091#l110

However, to perform the test, I would like to enforce the  
ClockEvictionPolicy to run or use some other method to make all the  
CHM entries not recently accessed. Can you think of one?

I'm about to write a similar method as __tc_clearReferences simply  
for this test. Instead of clearing the values, it would clear the  
accessed indicator. I however want to check with you first to see if  
there's not an existing way to do this already.

Thanks for the help,

Geert

--
Geert Bevin
Terracotta - http://www.terracotta.org
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com

_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to