[infinispan-dev] Time for a tryLock() ?

Mircea Markus mircea.markus at jboss.com
Thu Apr 26 07:55:26 EDT 2012


On 26 Apr 2012, at 14:42, Erik Salter wrote:

> FWIW, I implement a TryLock like this:  
> 
> boolean success = cache.getAdvancedCache()
>            .withFlags(Flag.FAIL_SILENTLY).lock(key);

+1, this seems like solving the issue.

> 
> Regards,
> 
> Erik
> 
> -----Original Message-----
> From: infinispan-dev-bounces at lists.jboss.org
> [mailto:infinispan-dev-bounces at lists.jboss.org] On Behalf Of Galder
> Zamarreño
> Sent: Thursday, April 26, 2012 6:59 AM
> To: Mircea Markus
> Cc: infinispan -Dev List
> Subject: [infinispan-dev] Time for a tryLock() ?
> 
> Looks like rolling back the transaction when a lock timeout is encountered
> can be problematic: https://community.jboss.org/message/731307#731307
> 
> Maybe time to implement a tryLock() that attempts to acquire the lock but
> does not rollback the transaction if it cannot acquire it?
> 
> Thoughts?
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 




More information about the infinispan-dev mailing list