cookbook java 多线程_GitHub - jiasanshou/book-java7-concurrency-cookbook: 《Java 7 Concurrency Cookbook(...

《Java 7 Concurrency Cookbook(Java 7 并发编程指南)》 作者: Javier Fernández González

译者:郑玉婷,许巧辉 校对:方腾飞,欧振聪

本项目是《 Java 7 Concurrency Cookbook 》的笔记。

1.1 介绍

1.2 线程的创建和运行

1.3 获取和设置线程信息

1.4 线程的中断

1.5 操作线程的中断机制

1.6 线程的睡眠和恢复

1.7 等待线程的终结

1.8 守护线程的创建和运行

1.9 处理线程的不受控制异常

1.10 使用本地线程变量

1.11 线程组

1.12 处理线程组内的不受控制异常

1.13 用线程工厂创建线程

2.1 介绍

2.2 同步方法

2.3 在同步的类里安排独立属性

2.4 在同步代码中使用条件

2.5 使用Lock来同步代码块

2.6 使用读/写锁来同步数据访问

2.7 修改Lock的公平性

2.8 在Lock中使用多条件

3.1 介绍

3.2 控制并发访问一个资源

3.3 控制并发访问多个资源

3.4 等待多个并发事件完成

3.5 在一个相同点同步任务

3.6 运行并发阶段性任务

3.7 控制并发阶段性任务的改变

3.8 在并发任务间交换数据

4.1 介绍

4.2 创建一个线程执行者

4.3 创建一个大小固定的线程执行者

4.4 执行者执行返回结果的任务

4.5 运行多个任务并处理第一个结果

4.6 运行多个任务并处理所有的结果

4.7 在延迟后执行者运行任务

4.8 执行者定期的执行任务

4.9 执行者取消任务

4.10 执行者控制一个结束任务

4.11 执行者分离运行任务和处理结果

4.12 执行者控制被拒绝的任务

5.1 介绍

5.2 创建 Fork/Join 池

5.3 加入任务的结果

5.4 异步运行任务

5.5 任务中抛出异常

5.6 取消任务

6.1 介绍

6.2 使用非阻塞线程安全列表

6.3 使用阻塞线程安全列表

6.4 用优先级对使用阻塞线程安全列表排序

6.5 使用线程安全与带有延迟元素的列表

6.6 使用线程安全的导航地图

6.7 生成并行随机数

6.8 使用原子变量

6.9 使用原子集合

7.1 介绍

7.2 定制ThreadPoolExecutor 类

7.3 实现一个优先级制的执行者类

7.4 实现ThreadFactory接口来生成自定义线程

7.5 在执行者对象中使用我们的 ThreadFactory

7.6 在计划好的线程池中定制运行任务

7.7 实现ThreadFactory接口来生成自定义线程给Fork/Join框架

7.8 在Fork/Join框架中定制运行任务

7.9 实现一个自定义锁类

7.10 实现一个基于优先级传输Queue

7.11 实现你自己的原子对象

8.1 介绍

8.2 监控锁接口

8.3 监控Phaser类

8.4 监控执行者框架

8.5 监控Fork/Join池

8.6 编写有效的日志

8.7 FindBugs分析并发代码

8.8 配置Eclipse来调试并发代码

8.9 配置NetBeans来调试并发代码

8.10 MultithreadedTC测试并发代码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Java 9 Concurrency Cookbook - Second Edition by Javier Fernandez Gonzalez English | 25 Apr. 2017 | ASIN: B01KOG6V5M | 594 Pages | AZW3 | 4.11 MB Key Features Get detailed coverage of important recipes on multi-threading and parallel programming This book takes a close look at the Java 9 APIs and their impact on concurrency See practical examples on thread safety, high-performance classes, safe sharing, and a whole lot more Book Description Writing concurrent and parallel programming applications is an integral skill for any Java programmer. Java 9 comes with a host of fantastic features, including significant performance improvements and new APIs. This book will take you through all the new APIs, showing you how to build parallel and multi-threaded applications. The book covers all the elements of the Java Concurrency API, with essential recipes that will help you take advantage of the exciting new capabilities. You will learn how to use parallel and reactive streams to process massive data sets. Next, you will move on to create streams and use all their intermediate and terminal operations to process big collections of data in a parallel and functional way. Further, you'll discover a whole range of recipes for almost everything, such as thread management, synchronization, executors, parallel and reactive streams, and many more. At the end of the book, you will learn how to obtain information about the status of some of the most useful components of the Java Concurrency API and how to test concurrent applications using different tools. What you will learn Find out to manage the basic components of the Java Concurrency API Use synchronization mechanisms to avoid data race conditions and other problems of concurrent applications Separate the thread management from the rest of the application with the Executor framework Solve problems using a parallelized version of the divide and conquer paradigm with the Fork / Join framework Process massive data sets in an optimized way using streams and reactive streams See which data structures we can use in concurrent applications and how to use them Practice efficient techniques to test concurrent applications Get to know tips and tricks to design concurrent applications About the Author Javier Fernandez Gonzalez is a software architect with almost 15 years of experience in Java technologies. He has worked as a teacher, researcher, programmer, analyst, and writer, and he now works as an architect in all types of projects related to Java, especially J2EE. As a teacher, has taken over 1,000 hours of training in basic Java, J2EE, and the Struts framework. As a researcher, he has worked in the field of information retrieval, developing applications for processing large amounts of data in Java, and has participated as a coauthor in several journal articles and conference presentations. Recently, he worked on developing J2EE web applications for various clients from different sectors (public administration, insurance, healthcare, transportation, and so on). Currently, he works as a software architect. He is the author of the book, Java 7 Concurrency Cookbook and Mastering Concurrency Programming with Java 8 by Packt. Table of Contents Thread Management Basic Thread Synchronization Thread Synchronization Utilities Thread Executors Fork/Join Framework Parallel and Reactive Streams Concurrent Collections Customizing Concurrency Classes Testing Concurrent Applications Additional Information Concurrent Programming Design

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值