-
1. Re: RemoteCache.replaceWithVersion return type
rvansa Aug 8, 2014 10:40 AM (in response to andreas.oh)It's not a "problem", it's a way to handle concurrent updates. You should retrieve the value & version using getWithVersion - the following replaceWithVersion should pass the version in order to make sure that nobody has changed the entry between those two operations. After the value is replaced, new version is generated in the cache - if you want to replace that again, you have to call getWithVersion again.
-
2. Re: RemoteCache.replaceWithVersion return type
andreas.oh Oct 2, 2014 1:16 AM (in response to rvansa)Hi Radim,
Thanks for your response. I'm aware of the concept of replaceWithVersion and I'm using it exactly as you describe for handling concurrent updates of cache entries. What I am after is, if there exists other cases (except that the version does not match) where replaceWithVersion returns false?
I know it throws a bunch of exceptions for various scenarios for instance for connection time out which is good, I just want to be sure that when it returns false it is because of concurrent update.
Thanks.
Andreas