This method is called to wait for an event completion on the indicated semaphore, with a specified time.
调用这个方法来等待所需要信号上某个事件的完成,等待指定的一段时间。
If an event occurs during the specified time period, this method exits, returning the relevant WatchKey.
如果在特定时间范围内,有任何事件发生,这一方法存在,会返回相应的WatchKey。
At some unspecified later time, when the subject's state changes, the subject notifies the observer of the change event with the update method callback.
在随后某个未知的时候,目标对象的状态发生了更改,目标对象会使用update回调方法,通知观察者,告知已经发生了状态更改事件。
应用推荐