This content has been marked as final.
Show 2 replies
-
1. Re: Cache region size
genman Jun 13, 2007 2:00 PM (in response to nenorbot)
Regions don't necessarily track this information, though I suppose they could. You could write a function to calculate the size, using a combination of CacheSPI.peek() (2.0) or TreeCache.peek() ... Recursively iterate over children of the Nodes returned by peek(). -
2. Re: Cache region size
genman Jun 13, 2007 2:15 PM (in response to nenorbot)What I mean by "not necessarily" is that the eviction algorithms do track size. So, your region would have to have some sort of eviction policy. In which case, you can get at the size by doing a
Region.getEvictionPolicy().getEvictionAlgorithm().getEvictionQueue().getNumberOfNodes()