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

字段摘要
protected  boolean hasNotified
           
protected  HashMap<Long,Boolean> waitingThreadTable
           
 
构造方法摘要
WaitNotifyObject()
           
 
方法摘要
 void allWaitForRunning(long interval)
          多个线程调用wait
protected  void onWaitEnd()
           
protected  void waitForRunning(long interval)
           
 void wakeup()
           
 void wakeupAll()
          广播方式唤醒
 
从类 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.