Hi Sergio, I personally think it should return false since the lock is never acquired in FinegrainedLockNoDso.
If this class is rewritten to do actual locking on meaning entities, then the return value could should, but now with its no-op implementation I think it's good to be correct and not give out any false guarantees. Take care, Geert On 16 Nov 2009, at 10:47, Sergio Bossa wrote: > Guys, > > the FinegrainedLockNoDso class returns false on tryLock() methods, > hence breaking my unit tests: is there any reason for that behavior? > It's just a kind of stub, so I think it wouldn't be harmful to return > true, other than be more consistent with lock() methods which are > no-ops. > > What do you think? > > On Thu, Nov 12, 2009 at 9:32 PM, Alex Miller <[email protected]> > wrote: >> Hey Sergio, >> >> Tim rightly pointed at ConcurrentDistributedMap.createFinegrainedLock(K) >> which will return you a FineGrainedLock object (with tryLock methods) that >> lets you accomplish the equivalent of tryLockEntry(). Is that sufficient? >> >> http://forge.terracotta.org/releases/projects/tim-concurrent-collections-root/apidocs/org/terracotta/collections/ConcurrentDistributedMap.html >> http://forge.terracotta.org/releases/projects/tim-concurrent-collections-root/apidocs/org/terracotta/collections/FinegrainedLock.html >> -- Geert Bevin Terracotta - http://www.terracotta.org Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Flytecase Band - http://flytecase.be Music and words - http://gbevin.com _______________________________________________ tc-dev mailing list [email protected] http://lists.terracotta.org/mailman/listinfo/tc-dev
