|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.zookeeper.ZkLock
public class ZkLock
Zookeeper Lock implementation. Assumes that this is called during a running zookeeper session.
| Constructor Summary | |
|---|---|
ZkLock(ZkConnection zk,
java.lang.String lockRootNodePath)
|
|
| Method Summary | |
|---|---|
boolean |
isLockStillValid()
Can be called by a client to find out if the acquired lock is still valid. |
boolean |
tryLock()
Acquires the lock only if it is free at the time of invocation. |
void |
unlock()
Releases the lock. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZkLock(ZkConnection zk,
java.lang.String lockRootNodePath)
zk - zookeeper connectionlockRootNodePath - zookeeper node where to set the lock| Method Detail |
|---|
public boolean tryLock()
public void unlock()
public boolean isLockStillValid()
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||