-
1. Re: Intercepting when a join task completes succesfully and reloading balance on my benchmark
dan.berindei Oct 19, 2011 3:55 AM (in response to renzos)1 of 1 people found this helpfulNormally the getCache() call won't return until the new node has joined, only in rare occasions it won't find the existing members and start a cluster by itself.
For these rare occasions in Infinispan 5.0 you can register a listener with the @DataRehashed annotation that will be called before and after the key rebalancing. You can check the list of members to see if the node has really joined the existing cluster or you need to wait for another rehash event.
-
2. Re: Intercepting when a join task completes succesfully and reloading balance on my benchmark
renzos Oct 19, 2011 4:21 AM (in response to dan.berindei)Thanks for the answer, it would be great using v.5.0 but I have to use 4.2.1FINAL. I'm looking for an interceptor for my needs but nothing, anyway I'm interested in sync-replication only.
-
3. Re: Intercepting when a join task completes succesfully and reloading balance on my benchmark
dan.berindei Oct 19, 2011 6:09 AM (in response to renzos)Even with you can still rely on getCache() returning only after retrieving the state, except in the cases when the node doesn't find the cluster at start and has to merge later.
After a merge however replicated caches don't transfer state, so you can just register a @ViewChanged listener and wait until it's called with a merge view.