rubyu/zookeeper-client — comment on commit 43809c1fab650f4cb0c706e5ee2420fcbf78bce0
File: src/main/scala/com/github/rubyu/zookeeper/example/lock/WriteLock.scala line 7
By rubyu:

val prefix = "lock-write-" // or "lock-read-"
var mine: Option[ZooKeeperNode] = null

def isMine(node: ZooKeeperNode) = node == mine.get

override protected def open() {
mine = Some(create())
entries.update()
}