org.I0Itec.zkclient
Class ZkLock

java.lang.Object
  extended by java.util.concurrent.locks.ReentrantLock
      extended by org.I0Itec.zkclient.ZkLock
All Implemented Interfaces:
java.io.Serializable, java.util.concurrent.locks.Lock

public class ZkLock
extends java.util.concurrent.locks.ReentrantLock

See Also:
Serialized Form

Constructor Summary
ZkLock()
           
 
Method Summary
 java.util.concurrent.locks.Condition getDataChangedCondition()
          This condition will be signaled if a zookeeper event was processed and the event contains a data/child change.
 java.util.concurrent.locks.Condition getStateChangedCondition()
          This condition will be signaled if a zookeeper event was processed and the event contains a state change (connected, disconnected, session expired, etc ...).
 java.util.concurrent.locks.Condition getZNodeEventCondition()
          This condition will be signaled if any znode related zookeeper event was received.
 
Methods inherited from class java.util.concurrent.locks.ReentrantLock
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZkLock

public ZkLock()
Method Detail

getDataChangedCondition

public java.util.concurrent.locks.Condition getDataChangedCondition()
This condition will be signaled if a zookeeper event was processed and the event contains a data/child change.

Returns:
the condition.

getStateChangedCondition

public java.util.concurrent.locks.Condition getStateChangedCondition()
This condition will be signaled if a zookeeper event was processed and the event contains a state change (connected, disconnected, session expired, etc ...).

Returns:
the condition.

getZNodeEventCondition

public java.util.concurrent.locks.Condition getZNodeEventCondition()
This condition will be signaled if any znode related zookeeper event was received.

Returns:
the condition.