[infinispan-dev] ISPN-863 - Thoughts / Questions

Bela Ban bban at redhat.com
Fri Jan 14 09:46:02 EST 2011



On 1/14/11 3:32 PM, david marion wrote:
>
>
>    I agree. There are two ways to determine what the memory usage is, polling or notifications. The notification mechanism is not guaranteed


Are you referring to MemoryMXBean / MemoryPoolMXBean ? What do you mean 
by not guaranteed ? Are you suggesting the notfications are not 
implemented by all JVM vendors ?


> so we could have a background thread that polls to determine whether or not the threshold has been passed. Then in the put and replace methods, it would be the cost of checking a boolean value.

When notifications are available, we should use them, otherwise polling 
would be fine, I guess.


-- 
Bela Ban
Lead JGroups / Clustering Team
JBoss


More information about the infinispan-dev mailing list