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)
cache.put(K,V5)
tx.commit()
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