com.alibaba.rocketmq.store.ha
类 WaitNotifyObject
java.lang.Object
com.alibaba.rocketmq.store.ha.WaitNotifyObject
public class WaitNotifyObject
- extends Object
用来做线程之间异步通知
- 从以下版本开始:
- 2013-7-21
- 作者:
- shijia.wxr
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
waitingThreadTable
protected final HashMap<Long,Boolean> waitingThreadTable
hasNotified
protected volatile boolean hasNotified
WaitNotifyObject
public WaitNotifyObject()
wakeup
public void wakeup()
waitForRunning
protected void waitForRunning(long interval)
onWaitEnd
protected void onWaitEnd()
wakeupAll
public void wakeupAll()
- 广播方式唤醒
allWaitForRunning
public void allWaitForRunning(long interval)
- 多个线程调用wait
Copyright © 2012–2015. All rights reserved.