I was wondering if anyone knows how does TreeCacheAOP manage locks for aspectized collection classes.
Basically I want to put a large map on the cache, and then use the apectized map. I'm expecting heavy reads and non freequent write to the map. As performence is critical, I need the locking to be on the current key that is modified, and not on the whole map. Is this the case?
BTW, another question: is there any way to run over all the map elements using an iterator without locking the whole map?
Yes, once you mapped it to TreeCacheAop, locking is performed on the indices level.
Using the iterator won't lock the whole tree but it is not thread safe.