public class InterProcessSemaphoreMutexWithData extends Object implements InterProcessLockWithData
| Constructor and Description |
|---|
InterProcessSemaphoreMutexWithData(org.apache.curator.framework.CuratorFramework theClient,
String thePath) |
| Modifier and Type | Method and Description |
|---|---|
void |
acquire() |
boolean |
acquire(long time,
TimeUnit unit) |
byte[] |
getData() |
boolean |
isAcquiredInThisProcess() |
boolean |
isHeld()
Broader lock status inquiry than
InterProcessLock.isAcquiredInThisProcess(), a lock can be held, but not by this
specific process. |
void |
release() |
void |
setData(byte[] theData) |
public InterProcessSemaphoreMutexWithData(org.apache.curator.framework.CuratorFramework theClient,
String thePath)
theClient - the clientthePath - path for the lockpublic void acquire()
throws Exception
acquire in interface org.apache.curator.framework.recipes.locks.InterProcessLockExceptionpublic boolean acquire(long time,
TimeUnit unit)
throws Exception
acquire in interface org.apache.curator.framework.recipes.locks.InterProcessLockExceptionpublic void release()
throws Exception
release in interface org.apache.curator.framework.recipes.locks.InterProcessLockExceptionpublic boolean isAcquiredInThisProcess()
isAcquiredInThisProcess in interface org.apache.curator.framework.recipes.locks.InterProcessLockpublic byte[] getData()
throws Exception
getData in interface InterProcessLockWithDataExceptionpublic void setData(byte[] theData)
setData in interface InterProcessLockWithDataCopyright © 2010-2016 Stardog Union. All Rights Reserved.