摘要: Watcher设置是开发中最常见的,需要搞清楚watcher的一些基本特征,对于exists、getdata、getchild对于节点的不同操 作会收到不同的watcher信息。对父节点的变更以及孙节点的变更都不会触发watcher,而对watcher本身节点以及子节点的变更会触发 watcher,... 阅读全文
posted @ 2014-09-27 23:40 谭志宇 阅读(1306) 评论(0) 推荐(0) 编辑
摘要: 半路出家学习java, 花了几分钟简单看了。在早上那个例子上稍微改了下,notify 对象上必须使用synchronized我的理解是在java synchronized只是个线程同步标志,但是不会堵塞线程,而wait会堵塞调用者线程,类windows的堵塞函数,而notify相当于解锁(个人把它当... 阅读全文
posted @ 2014-09-27 21:00 谭志宇 阅读(2691) 评论(0) 推荐(0) 编辑
摘要: import java.util.concurrent.CountDownLatch;public class CountDown { private static CountDownLatch connectedSignal = new CountDownLatch(50); static cla... 阅读全文
posted @ 2014-09-27 10:30 谭志宇 阅读(496) 评论(0) 推荐(0) 编辑