This content has been marked as final.
Show 1 reply
-
1. Re: TreeCache: How to write atomic updates?
brian.stansberry Sep 26, 2006 12:41 PM (in response to kapilanand)There is no explicit lock/unlock API. To get the effect you want you should use a transaction; a RL will be acquired on the get() call; WL for the put/remove. Locks will be retained until the tx commits or rolls back. If for some reason the calling thread hangs, eventually the tx will time out adn the transaction manager will roll it back, releasing the locks.
Please note though that a call to exists() does not acquire any lock.