- 封闭接口:
WatcherMgr<E>
@ThreadSafe
public static interface WatcherMgr.Watcher<E>
实现时要小心线程安全问题
-
方法概要
-
方法详细资料
-
test
该方法禁止抛出异常,否则可能导致严重错误(事件丢失),可能导致死锁 -
onEvent
onEvent的最好是仅仅将数据传输到监听者线程并唤醒线程,不要执行复杂的逻辑 比如通过future传输数据,监听者在future上阻塞。
-
WatcherMgr<E>