本文整理匯總了Java中org.I0Itec.zkclient.ZkLock類的典型用法代碼示例。如果您正苦於以下問題:Java ZkLock類的具體用法?Java ZkLock怎麽用?Java ZkLock使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ZkLock類屬於org.I0Itec.zkclient包,在下文中一共展示了ZkLock類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getEventLock
import org.I0Itec.zkclient.ZkLock; //導入依賴的package包/類
/**
* Returns a mutex all zookeeper events are synchronized aginst. So in case you need to do something without getting
* any zookeeper event interruption synchronize against this mutex. Also all threads waiting on this mutex object
* will be notified on an event.
*
* @return the mutex.
*/
public ZkLock getEventLock() {
return _zkEventLock;
}
示例2: getEventLock
import org.I0Itec.zkclient.ZkLock; //導入依賴的package包/類
/**
* Returns a mutex all zookeeper events are synchronized aginst. So in case you need to do something without getting
* any zookeeper event interruption synchronize against this mutex. Also all threads waiting on this mutex object
* will be notified on an event.
*
* @return the mutex.
*/
public ZkLock getEventLock() {
return _zkEventLock;
}