How does the lock path parameter works in ZooKeeper (InterProcessMutex)?

Viewed 147

Yet can someone briefly explain what the lock path is in ZooKeeper and how it works?

Specifically,

(1) I think lock path is pretty much the key(name) of a lock, so I can give any random value, correct?

(2) If two processes having two lock paths such as "/Hello", and "/Hello/World", and call acquire() at almost same time, what would happen? How two processes both having same lock paths "/Hello" and call acquire() at almost same time?

0 Answers
Related