On 27.04.2012 11:05, Dan Berindei wrote:

I wasn't thinking of a flag, I was thinking of a withTimeout(timeout)
method on AdvancedCache. There may be other "flags" that could be
customized with a value as well, but then you'd need to keep them in a
map and it could be more trouble than it's worth.

The complication with withTimeout/tryLock OTOH is that as a user I'd
expect it to limit everything, not just the lock acquisition - so it
would have to override sync.replTimeout as well.

Where is the JIRA to vote for? :)

The javadoc for lock says:"false will only be returned if the lock acquisition timed out and the operation has been called with |Flag.FAIL_SILENTLY| <http://docs.jboss.org/infinispan/5.1/apidocs/org/infinispan/context/Flag.html#FAIL_SILENTLY>.". As user I'd assume that when using the mentioned flag and independend what errors happen, the lock will _only_ return false in case of an timeout.

Is the discussed "tryLock" in the end the expected behaviour for lock with FAIL_SILENTLY regarding the javadoc?

_______________________________________________
infinispan-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/infinispan-dev

Reply via email to