Coordination Support in Class Object
Class Object declares five methods that enable programmers to access the Java virtual machine's support for the coordination aspect of synchronization. These methods are declared public and final, so they are inherited by all classes. They can only be invoked from within a synchronized method or statement. In other words, the lock associated with an object must already be acquired before any of these methods are invoked. The methods are listed in Table 20-2. Table 20-2. The wait and notify methods of class Object
Method Description
void wait(); Enter a monitor's wait set until notified by another thread
void wait(long timeout); Enter a monitor's wait set until notified by another thread or timeout milliseconds elapses
void wait(long timeout, int nanos); Enter a monitor's wait set until notified by another thread or timeout milliseconds plus nanos nanoseconds elapses
void notify(); Wake up one thread waiting in the monitor's wait set. (If no threads are waiting, do nothing.)
void notifyAll(); Wake up all threads waiting in the monitor's wait set. (If no threads are waiting, do nothing.)
Table 20-2. The wait and notify methods of class Object
On the CD-ROM
The CD-ROM contains the source code examples from this chapter in a subdirectory of the threads directory.
The Resources Page
For more information about the material presented in this chapter, visit the resources page: http://www.artima.com/insidejvm/resources.
分享到:
相关推荐
Coordination Support in Class Object On the CD-ROM The Resources Page Appendix A. Instructions by Opcode Mnemonic Appendix B. Opcode Mnemonic by Functional Group Appendix C. Opcode Mnemonic by ...
Coordination Models and Languages 6th International Conference,COORDINATION 2004 Pisa Italy, February 24-27, 2004 Lecture Notes in Computer Science 2949
WS-Coordination Specification. E文版的WS-Coordination规范.
Overview: Coordinating groups of AI in combat is a hard problem, coordinating groups of AI in an open world game where the enemy can come from any direction is harder yet. This talk details how groups...
Information sharing and coordination mechanisms for managing uncertainty insupply chains a simulation study
Interference-Coordination-in-Full-Duplex-HetNet-with-Large-Scale-Antenna-Arrays Paper about Small Cell, Massive MIMO and Full-duplex Introduction 这篇论文研究的是结合了Small Cell, Massive MIMO和Full-...
ZooKeeper Distributed process coordination
在理论框架中运用模糊逻辑控制目标跟踪 电子文档 word
This paper presents a novel scheduling algorithm for HCCA (Hybrid Coordination Controlled Channel Access) access model of IEEE 802.11e.The aim of this algorithm is to enhance the QoS for the support ...
Coordination 论文资料 最新的有关coordination的资料
Even with ZooKeeper, implementing coordination tasks is not trivial, but this book provides good practices to give you a head start, and points out caveats that developers and administrators alike ...
ZooKeeper was designed to be a robust service that enables application developers to focus mainly on their application logic rather than coordination.
driver-in-the-loop tests on a driving simulator are conducted and the results show that the developed control system provides significant benefits in weakening the impact of DYC on ACC longitudinal ...
Wei Ren和Yongcan Cao关于多智能体系统分布式协调控制方向的经典教材。
Currency war or international policy coordination by Barry Eichengreen
WS-Coordination200411
02014IEEE IE0--Coordination for Linear Multiagent Systems With Dynamic Interaction Topology in the Leader-Following Framework.pdf
ARM Power State and Coordination Interface (PSCI) header.
Deep Learning-Based Beam Management and Interference Coordination in Dense mmWave Networks
insulation coordination