curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kulkarni.swarnim@gmail.com" <kulkarni.swar...@gmail.com>
Subject InterProcessMutex acquire
Date Wed, 20 Nov 2013 15:56:16 GMT
Hello,

So with the InterProcessMutex#acquire method[1], I was a little confused
with what the acquire method would actually do in case another thread
already owns the lock. The documentation seems a little conflicting. At one
place it says "Acquire the mutex - *blocks until it's available*" while at
another it says "java.lang.Exception - ZK errors, interruptions, *another
thread owns the lock*".

In my tests, I am seeing the blocking behavior but curious in what cases an
exception would get thrown?

If someone could clarify this for me, that will be awesome.

[1]
http://netflix.github.io/curator/doc/com/netflix/curator/framework/recipes/locks/InterProcessMutex.html#acquire(long,
java.util.concurrent.TimeUnit)

-- 
Swarnim

Mime
View raw message