|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.usergrid.locking.zookeeper.ZookeeperLockImpl
public class ZookeeperLockImpl
Wrapper for locks using curator
Constructor Summary | |
---|---|
ZookeeperLockImpl(com.netflix.curator.framework.recipes.locks.InterProcessMutex zkMutex)
|
Method Summary | |
---|---|
void |
lock()
Block until a lock is available |
boolean |
tryLock(long timeout,
TimeUnit time)
Acquire the lock. |
void |
unlock()
Release the lock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ZookeeperLockImpl(com.netflix.curator.framework.recipes.locks.InterProcessMutex zkMutex)
Method Detail |
---|
public boolean tryLock(long timeout, TimeUnit time) throws UGLockException
Lock
tryLock
in interface Lock
timeout
- The amount of time to waittime
- the units of time to wait
UGLockException
public void lock() throws UGLockException
Lock
lock
in interface Lock
UGLockException
public void unlock() throws UGLockException
Lock
unlock
in interface Lock
UGLockException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |