在好例子网,分享、交流、成长!
您当前所在位置:首页Java 开发实例Java语言基础 → Programming Concurrency on the JVM(2011)

Programming Concurrency on the JVM(2011)

Java语言基础

下载此实例
  • 开发语言:Java
  • 实例大小:5.32M
  • 下载次数:9
  • 浏览次数:35
  • 发布时间:2022-08-31
  • 实例类别:Java语言基础
  • 发 布 人:ZSPINGGG
  • 文件格式:.pdf
  • 所需积分:2
 相关标签: Programming C Programming 2011 JVM Pro

实例介绍

【实例简介】Programming Concurrency on the JVM(2011)

【实例截图】

【核心代码】

Contents
Preface
. . . . . . . . . . . . . xi
1.
The Power and Perils of Concurrency
. . . . . . 1
Threads: The Flow of Execution
1
1.1
1.2 The Power of Concurrency
2
1.3 The Perils of Concurrency
5
1.4 Recap
10
Part I — Strategies for Concurrency
2.
Division of Labor
. . . . . . . . . . . 15
From Sequential to Concurrent
15
2.1
2.2 Concurrency in IO-Intensive Apps
18
2.3 Speedup for the IO-Intensive App
25
2.4 Concurrency in Computationally Intensive Apps
25
2.5 Speedup for the Computationally Intensive App
31
2.6 Strategies for Effective Concurrency
33
2.7 Recap
34
3.
Design Approaches
. . . . . . . . . . 35
Dealing with State
35
3.1
3.2 Exploring Design Options
36
3.3 Shared Mutable Design
37
3.4 Isolated Mutable Design
37
3.5 Purely Immutable Design
38
3.6 Persistent/Immutable Data Structures
39
3.7 Selecting a Design Approach
42
3.8 Recap
43
Download at www.Pin5i.ComPart II — Modern Java/JDK Concurrency
4.
Scalability and Thread Safety
. . . . . . . . 47
Managing Threads with ExecutorService
48
4.1
4.2 Coordinating Threads
49
4.3 Exchanging Data
58
4.4 Java 7 Fork-Join API
61
4.5 Scalable Collections
63
4.6 Lock vs. Synchronized
66
4.7 Recap
71
5.
Taming Shared Mutability . . . . . . . . . 73
Shared Mutability != public
73
5.1
5.2 Spotting Concurrency Issues
74
5.3 Preserve Invariant
75
5.4 Mind Your Resources
76
5.5 Ensure Visibility
79
5.6 Enhance Concurrency
80
5.7 Ensure Atomicity
82
5.8 Recap
85
Part III — Software Transactional Memory
6.
Introduction to Software Transactional Memory
. . .
89
Synchronization Damns Concurrency
89
6.1
6.2 The Deficiency of the Object Model
90
6.3 Separation of Identity and State
91
6.4 Software Transactional Memory
92
6.5 Transactions in STM
96
6.6 Concurrency Using STM
97
6.7 Concurrency Using Akka/Multiverse STM
102
6.8 Creating Transactions
104
6.9 Creating Nested Transactions
111
6.10 Configuring Akka Transactions
120
6.11 Blocking Transactions—Sensible Wait
122
6.12 Commit and Rollback Events
126
6.13 Collections and Transactions
129
6.14 Dealing with the Write Skew Anomaly
133
6.15 Limitations of STM
136
6.16 Recap
140
• viii
Download at www.Pin5i.Com7.
STM in Clojure, Groovy, Java, JRuby, and Scala
. . .
141
Clojure STM
142
7.1
7.2 Groovy Integration
142
7.3 Java Integration
146
7.4 JRuby Integration
149
7.5 Choices in Scala
156
7.6 Recap
158
Part IV — Actor-Based Concurrency
8.
Favoring Isolated Mutability
. . . . . . . . 163
Isolating Mutability Using Actors
164
8.1
8.2 Actor Qualities
165
8.3 Creating Actors
166
8.4 Sending and Receiving Messages
173
8.5 Working with Multiple Actors
178
8.6 Coordinating Actors
182
8.7 Using Typed Actors
190
8.8 Typed Actors and Murmurs
195
8.9 Mixing Actors and STM
201
8.10 Using Transactors
202
8.11 Coordinating Typed Actors
210
8.12 Remote Actors
216
8.13 Limitations of the Actor-Based Model
218
8.14 Recap
219
9.
Actors in Groovy, Java, JRuby, and Scala . . . . . 221
Actors in Groovy with GPars
221
9.1
9.2 Java Integration
235
9.3 JRuby Akka Integration
235
9.4 Choices in Scala
239
9.5 Recap
239
Part V — Epilogue
10. Zen of Programming Concurrency
. . . . . . 243
Exercise Your Options
243
10.1
10.2 Concurrency: Programmer’s Guide
244
10.3 Concurrency: Architect’s Guide
245
10.4 Choose Wisely
246
• ix
Download at www.Pin5i.ComA1. Clojure Agents
. . . . . . . . . . . 249
A2. Web Resources
. . . . . . . . . . . 255
A3. Bibliography . . . . . . . . . . . . 259
Index
. . . . . . . . . . . . . 261

实例下载地址

Programming Concurrency on the JVM(2011)

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警