Mark Miller [
http://community.jboss.org/people/millerm120] created the discussion
"return value from AdvancedCache.lock"
To view the discussion, visit:
http://community.jboss.org/message/641094#641094
--------------------------------------------------------------
The AdvancedCache.lock methods return a boolean which according to the JavaDoc is true if
lock acquired and false if it is not acquired.
| | * @return true if the lock acquisition attempt was successful for
<i>all</i> keys; false otherwise. |
All of the sample code I have seen looks like this:
tx.begin() cache.lock(K) // acquire cluster wide lock on K
cache.put(K,V5) // guaranteed to succeed
tx.commit() // releases locks
and does not check the return value of the lock call.
Is it possible for the call to lock to return false or will it always either return true
or throw an exception?
Thanks in advance,
Mark
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/641094#641094]
Start a new discussion in JBoss Cache at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]