public class NonReentrantCuratorReadWriteLock extends Object
InterProcessReadWriteLock,
but eliminates the re-entrancy. In particular, this allows a person to release the lock with a different thread than the one that acquires it.| Constructor and Description |
|---|
NonReentrantCuratorReadWriteLock(org.apache.curator.framework.CuratorFramework client,
String basePath) |
NonReentrantCuratorReadWriteLock(org.apache.curator.framework.CuratorFramework client,
String basePath,
byte[] lockData) |
| Modifier and Type | Method and Description |
|---|---|
NonReentrantMutex |
readLock()
Returns the lock used for reading.
|
NonReentrantMutex |
writeLock()
Returns the lock used for writing.
|
public NonReentrantCuratorReadWriteLock(org.apache.curator.framework.CuratorFramework client,
String basePath)
client - the clientbasePath - path to use for lockingpublic NonReentrantCuratorReadWriteLock(org.apache.curator.framework.CuratorFramework client,
String basePath,
byte[] lockData)
client - the clientbasePath - path to use for lockinglockData - the data to store in the lock nodespublic NonReentrantMutex readLock()
public NonReentrantMutex writeLock()
Copyright © 2010-2016 Stardog Union. All Rights Reserved.