From afee8d8a38b8210c5db804492f7a0b4f0339fd94 Mon Sep 17 00:00:00 2001 From: guide Date: Mon, 7 Feb 2022 14:06:01 +0800 Subject: [PATCH] =?UTF-8?q?[docs=20fix]=E6=96=87=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E8=A7=84=E8=8C=83&=E9=94=99=E8=AF=AF=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 14 +++-- README.md | 59 +++++++++++------- docs/.vuepress/config.js | 4 +- ...以及aqs同步组件总结.md => aqs.md} | 0 ...ic原子类总结.md => atomic-classes.md} | 0 .../CachedThreadPool-execute.png | Bin .../Executors工具类.png | Bin .../Executor框架的使用示意图.png | Bin .../FixedThreadPool.png | Bin ...adPoolExecutor执行周期任务步骤.png | Bin .../ScheduledThreadPoolExecutor机制.png | Bin .../SingleThreadExecutor.png | Bin .../threadpoolexecutor构造函数.png | Bin .../任务的执行相关接口.png | Bin .../图解线程池实现原理.png | Bin .../线程池各个参数之间的关系.png | Bin ...结.md => java-concurrent-collections.md} | 2 +- .../java-concurrent-questions-02.md | 2 +- ....md => java-thread-pool-best-practices.md} | 2 +- ...总结.md => java-thread-pool-summary.md} | 22 +++---- index.html | 1 - 21 files changed, 61 insertions(+), 45 deletions(-) rename docs/java/concurrent/{aqs原理以及aqs同步组件总结.md => aqs.md} (100%) rename docs/java/concurrent/{atomic原子类总结.md => atomic-classes.md} (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/CachedThreadPool-execute.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/Executors工具类.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/Executor框架的使用示意图.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/FixedThreadPool.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/ScheduledThreadPoolExecutor执行周期任务步骤.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/ScheduledThreadPoolExecutor机制.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/SingleThreadExecutor.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/threadpoolexecutor构造函数.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/任务的执行相关接口.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/图解线程池实现原理.png (100%) rename docs/java/concurrent/images/{java线程池学习总结 => java-thread-pool-summary}/线程池各个参数之间的关系.png (100%) rename docs/java/concurrent/{并发容器总结.md => java-concurrent-collections.md} (99%) rename docs/java/concurrent/{拿来即用的java线程池最佳实践.md => java-thread-pool-best-practices.md} (99%) rename docs/java/concurrent/{java线程池学习总结.md => java-thread-pool-summary.md} (97%) diff --git a/README.en.md b/README.en.md index 54f27572..b5451a5d 100644 --- a/README.en.md +++ b/README.en.md @@ -44,7 +44,11 @@ Read in other languages: [Mandarin](https://github.com/Snailclimb/JavaGuide/blob ### Basis -**Knowledge points/interview questions**: (Must see:+1: ): [Java Basics Knowledge Points/Interview Questions Summary](docs/java/basis/javabasics-summary.md) +**Knowledge points/interview questions**: (Must see:+1: ): + +- [Java Basics Knowledge Points/Interview Questions Summary(1)](docs/java/basis/java-basic-questions-01.md) +- [Java Basics Knowledge Points/Interview Questions Summary(2)](docs/java/basis/java-basic-questions-01.md) +- [Java Basics Knowledge Points/Interview Questions Summary(3)](docs/java/basis/java-basic-questions-01.md) **Important Knowledge Points Explained:** @@ -71,11 +75,11 @@ Read in other languages: [Mandarin](https://github.com/Snailclimb/JavaGuide/blob **Important Knowledge Points Explained:** -1. **Thread pool**: [Java thread pool learning summary](./docs/java/concurrent/java线程池学习总结.md), [Java thread pooling best practices](./docs/java/concurrent/拿来即用的java线程池最佳实践.md) +1. **Thread pool**: [Java thread pool learning summary](./docs/java/concurrent/java-thread-pool-summary.md), [Java thread pooling best practices](./docs/java/concurrent/java-thread-pool-best-practices.md) 2. [ThreadLocal keyword resolution](docs/java/concurrent/threadlocal.md) -3. [Java concurrency container summary](docs/java/concurrent/并发容器总结.md) -4. [Atomic atomic class summary](docs/java/concurrent/atomic原子类总结.md) -5. [AQS principle and AQS synchronization component summary](docs/java/concurrent/aqs原理以及aqs同步组件总结.md) +3. [Java concurrency container summary](docs/java/concurrent/java-concurrent-collections.md) +4. [Atomic atomic class summary](docs/java/concurrent/atomic-classes.md) +5. [AQS principle and AQS synchronization component summary](docs/java/concurrent/aqs.md) 6. [Getting Started with CompletableFuture](docs/java/concurrent/completablefuture-intro.md) ### JVM (must see :+1:) diff --git a/README.md b/README.md index 312550a4..25ca75c5 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## 👏 重大更新!!!重磅! - JavaGuide 在线阅读版(新版,推荐👍):https://javaguide.cn/ -- JavaGuide 在线阅读版(老版,部分链接已经无法访问):https://snailclimb.gitee.io/javaguide/#/ +- JavaGuide 在线阅读版(老版):https://snailclimb.gitee.io/javaguide/#/ - [《JavaGuide 面试突击版》PDF 版本下载](https://mp.weixin.qq.com/s?__biz=Mzg2OTA0Njk0OA==&mid=100029614&idx=1&sn=62993c5cf10265cb7018db7f1ec67250&chksm=4ea1fb6579d67273499b7243641d4ef372decd08047bfbb6dfb5843ef81c7ccba209086cf345#rd) @@ -43,34 +43,47 @@ ### 基础 -**知识点/面试题** : (必看:+1: ):[Java 基础知识点/面试题总结](docs/java/basis/java基础知识总结.md) +**知识点/面试题** : (必看:+1: ): -**重要知识点详解:** +- [Java 基础常见知识点&面试题总结(上)](docs/java/basis/java-basic-questions-01.md) +- [Java 基础常见知识点&面试题总结(中)](docs/java/basis/java-basic-questions-01.md) +- [Java 基础常见知识点&面试题总结(下)](docs/java/basis/java-basic-questions-01.md) + +**重要知识点详解** : - [为什么 Java 中只有值传递?](docs/java/basis/why-there-only-value-passing-in-java.md) -- [什么是反射机制?反射机制的应用场景有哪些?](docs/java/basis/反射机制详解.md) -- [代理模式详解:静态代理+JDK/CGLIB 动态代理实战](docs/java/basis/代理模式详解.md) -- [常见的 IO 模型有哪些?Java 中的 BIO、NIO、AIO 有啥区别?](docs/java/basis/io模型详解.md) +- [什么是反射机制?反射机制的应用场景有哪些?](docs/java/basis/reflection.md) +- [代理模式详解:静态代理+JDK/CGLIB 动态代理实战](docs/java/basis/proxy.md) +- [常见的 IO 模型有哪些?Java 中的 BIO、NIO、AIO 有啥区别?](docs/java/basis/io.md) - [BigDecimal解决浮点数运算精度丢失问题](docs/java/basis/bigdecimal.md) +- **[泛型连环炮](docs/java/basis/generics.md)** ### 集合 -1. **[Java 集合常见问题总结](docs/java/collection/java集合框架基础知识&面试题总结.md)** (必看 :+1:) +**知识点/面试题** : + +1. [Java 集合常见知识点&面试题总结(上)](docs/java/collection/java-collection-questions-01.md) (必看 :+1:) +2. [Java 集合常见知识点&面试题总结(下)](docs/java/collection/java-collection-questions-02.md) (必看 :+1:) 2. [Java 容器使用注意事项总结](docs/java/collection/java集合使用注意事项.md) -3. **源码分析** :[ArrayList 源码+扩容机制分析](docs/java/collection/arraylist-source-code.md) 、[HashMap(JDK1.8)源码+底层数据结构分析](docs/java/collection/hashmap-source-code.md) 、[ConcurrentHashMap 源码+底层数据结构分析](docs/java/collection/concurrent-hash-map-source-code.md) + +**源码分析** : + +- [ArrayList 源码+扩容机制分析](docs/java/collection/arraylist-source-code.md) +- [HashMap(JDK1.8)源码+底层数据结构分析](docs/java/collection/hashmap-source-code.md) +- [ConcurrentHashMap 源码+底层数据结构分析](docs/java/collection/concurrent-hash-map-source-code.md) ### 并发 -**知识点/面试题:** (必看 :+1:) +**知识点/面试题** : (必看 :+1:) -1. **[Java 并发基础常见面试题总结](docs/java/concurrent/java并发基础常见面试题总结.md)** -2. **[Java 并发进阶常见面试题总结](docs/java/concurrent/java并发进阶常见面试题总结.md)** +1. [Java 并发常见知识点&面试题总结(基础篇)](docs/java/concurrent/java-concurrent-questions-01.md) +2. [Java 并发常见知识点&面试题总结(进阶篇)](docs/java/concurrent/java-concurrent-questions-02.md) -**重要知识点详解:** +**重要知识点详解** : -1. **线程池**:[Java 线程池学习总结](./docs/java/concurrent/java线程池学习总结.md)、[拿来即用的 Java 线程池最佳实践](./docs/java/concurrent/拿来即用的java线程池最佳实践.md) +1. **线程池** :[Java 线程池详解](./docs/java/concurrent/java-thread-pool-summary.md)、[Java 线程池最佳实践](./docs/java/concurrent/java-thread-pool-best-practices.md) 2. [ThreadLocal 关键字解析](docs/java/concurrent/threadlocal.md) -3. [Java 并发容器总结](docs/java/concurrent/并发容器总结.md) +3. [Java 并发容器总结](docs/java/concurrent/java-concurrent-collections.md) 4. [Atomic 原子类总结](docs/java/concurrent/atomic原子类总结.md) 5. [AQS 原理以及 AQS 同步组件总结](docs/java/concurrent/aqs原理以及aqs同步组件总结.md) 6. [CompletableFuture入门](docs/java/concurrent/completablefuture-intro.md) @@ -193,17 +206,17 @@ JVM 这部分内容主要参考 [JVM 虚拟机规范-Java8 ](https://docs.oracle #### Spring/SpringBoot (必看 :+1:) -**知识点/面试题:** +**知识点/面试题** : -1. **[Spring 常见问题总结](docs/system-design/framework/spring/Spring常见问题总结.md)** +1. **[Spring 常见知识点&面试题总结](docs/system-design/framework/spring/spring-knowledge-and-questions-summary.md)** 2. **[SpringBoot 入门指南](https://github.com/Snailclimb/springboot-guide)** -**重要知识点详解:** +**重要知识点详解** : -1. **[Spring/Spring Boot 常用注解总结!安排!](./docs/system-design/framework/spring/Spring&SpringBoot常用注解总结.md)** -2. **[Spring 事务总结](docs/system-design/framework/spring/Spring事务总结.md)** -3. [Spring 中都用到了那些设计模式?](docs/system-design/framework/spring/Spring设计模式总结.md) -4. **[SpringBoot 自动装配原理?”](docs/system-design/framework/spring/SpringBoot自动装配原理.md)** +1. **[Spring/Spring Boot 常用注解总结!安排!](./docs/system-design/framework/spring/spring-common-annotations.md)** +2. **[Spring 事务总结](docs/system-design/framework/spring/spring-transaction.md)** +3. [Spring 中都用到了那些设计模式?](docs/system-design/framework/spring/spring-design-patterns-summary.md) +4. **[SpringBoot 自动装配原理](docs/system-design/framework/spring/spring-boot-auto-assembly-principles.md)** #### MyBatis @@ -220,7 +233,7 @@ JVM 这部分内容主要参考 [JVM 虚拟机规范-Java8 ](https://docs.oracle **[《认证授权基础》](docs/system-design/security/basis-of-authority-certification.md)** 这篇文章中我会介绍认证授权常见概念: **Authentication**,**Authorization** 以及 **Cookie**、**Session**、Token、**OAuth 2**、**SSO** 。如果你不清楚这些概念的话,建议好好阅读一下这篇文章。 - **JWT** :JWT(JSON Web Token)是一种身份认证的方式,JWT 本质上就一段签名的 JSON 格式的数据。由于它是带有签名的,因此接收者便可以验证它的真实性。相关阅读: - - [JWT 优缺点分析以及常见问题解决方案](docs/system-design/security/jwt优缺点分析以及常见问题解决方案.md) + - [JWT 优缺点分析以及常见问题解决方案](docs/system-design/security/advantages&disadvantages-of-jwt.md) - [适合初学者入门 Spring Security With JWT 的 Demo](https://github.com/Snailclimb/spring-security-jwt-guide) - **SSO(单点登录)** :**SSO(Single Sign On)** 即单点登录说的是用户登陆多个子系统的其中一个就有权访问与其相关的其他系统。举个例子我们在登陆了京东金融之后,我们同时也成功登陆京东的京东超市、京东家电等子系统。相关阅读:[**SSO 单点登录看这篇就够了!**](docs/system-design/security/sso-intro.md) @@ -400,7 +413,7 @@ Dubbo 是一款国产的 RPC 框架,由阿里开源。相关阅读: ### Docker - [Docker 基本概念解读](./docs/tools/docker/docker-intro.md) -- [Docker从入门到上手干事](./docs/tools/docker/docker-in-actiono.md) +- [Docker从入门到上手干事](./docs/tools/docker/docker-in-action.md) ## 关于作者 diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 52e43cb8..f68ef743 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -191,8 +191,8 @@ module.exports = config({ "java-concurrent-questions-01", "java-concurrent-questions-02", { title: "重要知识点", - children: ["java线程池学习总结", "并发容器总结", "拿来即用的java线程池最佳实践", "aqs原理以及aqs同步组件总结", "reentrantlock", - "atomic原子类总结", "threadlocal", "completablefuture-intro"], + children: ["java-thread-pool-summary", "java-thread-pool-best-practices", "java-concurrent-collections", "aqs", "reentrantlock", + "atomic-classes", "threadlocal", "completablefuture-intro"], }, ], }, diff --git a/docs/java/concurrent/aqs原理以及aqs同步组件总结.md b/docs/java/concurrent/aqs.md similarity index 100% rename from docs/java/concurrent/aqs原理以及aqs同步组件总结.md rename to docs/java/concurrent/aqs.md diff --git a/docs/java/concurrent/atomic原子类总结.md b/docs/java/concurrent/atomic-classes.md similarity index 100% rename from docs/java/concurrent/atomic原子类总结.md rename to docs/java/concurrent/atomic-classes.md diff --git a/docs/java/concurrent/images/java线程池学习总结/CachedThreadPool-execute.png b/docs/java/concurrent/images/java-thread-pool-summary/CachedThreadPool-execute.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/CachedThreadPool-execute.png rename to docs/java/concurrent/images/java-thread-pool-summary/CachedThreadPool-execute.png diff --git a/docs/java/concurrent/images/java线程池学习总结/Executors工具类.png b/docs/java/concurrent/images/java-thread-pool-summary/Executors工具类.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/Executors工具类.png rename to docs/java/concurrent/images/java-thread-pool-summary/Executors工具类.png diff --git a/docs/java/concurrent/images/java线程池学习总结/Executor框架的使用示意图.png b/docs/java/concurrent/images/java-thread-pool-summary/Executor框架的使用示意图.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/Executor框架的使用示意图.png rename to docs/java/concurrent/images/java-thread-pool-summary/Executor框架的使用示意图.png diff --git a/docs/java/concurrent/images/java线程池学习总结/FixedThreadPool.png b/docs/java/concurrent/images/java-thread-pool-summary/FixedThreadPool.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/FixedThreadPool.png rename to docs/java/concurrent/images/java-thread-pool-summary/FixedThreadPool.png diff --git a/docs/java/concurrent/images/java线程池学习总结/ScheduledThreadPoolExecutor执行周期任务步骤.png b/docs/java/concurrent/images/java-thread-pool-summary/ScheduledThreadPoolExecutor执行周期任务步骤.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/ScheduledThreadPoolExecutor执行周期任务步骤.png rename to docs/java/concurrent/images/java-thread-pool-summary/ScheduledThreadPoolExecutor执行周期任务步骤.png diff --git a/docs/java/concurrent/images/java线程池学习总结/ScheduledThreadPoolExecutor机制.png b/docs/java/concurrent/images/java-thread-pool-summary/ScheduledThreadPoolExecutor机制.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/ScheduledThreadPoolExecutor机制.png rename to docs/java/concurrent/images/java-thread-pool-summary/ScheduledThreadPoolExecutor机制.png diff --git a/docs/java/concurrent/images/java线程池学习总结/SingleThreadExecutor.png b/docs/java/concurrent/images/java-thread-pool-summary/SingleThreadExecutor.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/SingleThreadExecutor.png rename to docs/java/concurrent/images/java-thread-pool-summary/SingleThreadExecutor.png diff --git a/docs/java/concurrent/images/java线程池学习总结/threadpoolexecutor构造函数.png b/docs/java/concurrent/images/java-thread-pool-summary/threadpoolexecutor构造函数.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/threadpoolexecutor构造函数.png rename to docs/java/concurrent/images/java-thread-pool-summary/threadpoolexecutor构造函数.png diff --git a/docs/java/concurrent/images/java线程池学习总结/任务的执行相关接口.png b/docs/java/concurrent/images/java-thread-pool-summary/任务的执行相关接口.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/任务的执行相关接口.png rename to docs/java/concurrent/images/java-thread-pool-summary/任务的执行相关接口.png diff --git a/docs/java/concurrent/images/java线程池学习总结/图解线程池实现原理.png b/docs/java/concurrent/images/java-thread-pool-summary/图解线程池实现原理.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/图解线程池实现原理.png rename to docs/java/concurrent/images/java-thread-pool-summary/图解线程池实现原理.png diff --git a/docs/java/concurrent/images/java线程池学习总结/线程池各个参数之间的关系.png b/docs/java/concurrent/images/java-thread-pool-summary/线程池各个参数之间的关系.png similarity index 100% rename from docs/java/concurrent/images/java线程池学习总结/线程池各个参数之间的关系.png rename to docs/java/concurrent/images/java-thread-pool-summary/线程池各个参数之间的关系.png diff --git a/docs/java/concurrent/并发容器总结.md b/docs/java/concurrent/java-concurrent-collections.md similarity index 99% rename from docs/java/concurrent/并发容器总结.md rename to docs/java/concurrent/java-concurrent-collections.md index d6f3691b..bc467a87 100644 --- a/docs/java/concurrent/并发容器总结.md +++ b/docs/java/concurrent/java-concurrent-collections.md @@ -1,5 +1,5 @@ --- -title: JDK 提供的并发容器总结 +title: Java 常见并发容器总结 category: Java tag: - Java并发 diff --git a/docs/java/concurrent/java-concurrent-questions-02.md b/docs/java/concurrent/java-concurrent-questions-02.md index 91755431..71c929cb 100644 --- a/docs/java/concurrent/java-concurrent-questions-02.md +++ b/docs/java/concurrent/java-concurrent-questions-02.md @@ -758,7 +758,7 @@ public void execute(Runnable command) { 通过下图可以更好的对上面这 3 步做一个展示,下图是我为了省事直接从网上找到,原地址不明。 -![图解线程池实现原理](images/java线程池学习总结/图解线程池实现原理.png) +![图解线程池实现原理](images/java-thread-pool-summary/图解线程池实现原理.png) 现在,让我们在回到 4.6 节我们写的 Demo, 现在是不是很容易就可以搞懂它的原理了呢? diff --git a/docs/java/concurrent/拿来即用的java线程池最佳实践.md b/docs/java/concurrent/java-thread-pool-best-practices.md similarity index 99% rename from docs/java/concurrent/拿来即用的java线程池最佳实践.md rename to docs/java/concurrent/java-thread-pool-best-practices.md index 45034bf3..0900f5c1 100644 --- a/docs/java/concurrent/拿来即用的java线程池最佳实践.md +++ b/docs/java/concurrent/java-thread-pool-best-practices.md @@ -1,5 +1,5 @@ --- -title: 拿来即用的Java线程池最佳实践 +title: Java 线程池最佳实践 category: Java tag: - Java并发 diff --git a/docs/java/concurrent/java线程池学习总结.md b/docs/java/concurrent/java-thread-pool-summary.md similarity index 97% rename from docs/java/concurrent/java线程池学习总结.md rename to docs/java/concurrent/java-thread-pool-summary.md index 2741a93d..8887ca61 100644 --- a/docs/java/concurrent/java线程池学习总结.md +++ b/docs/java/concurrent/java-thread-pool-summary.md @@ -1,5 +1,5 @@ --- -title: Java线程池学习总结 +title: Java 线程池详解 category: Java tag: - Java并发 @@ -59,7 +59,7 @@ public class ScheduledThreadPoolExecutor implements ScheduledExecutorService ``` -![任务的执行相关接口](images/java线程池学习总结/任务的执行相关接口.png) +![任务的执行相关接口](images/java-thread-pool-summary/任务的执行相关接口.png) #### 3) 异步计算的结果(`Future`) @@ -69,7 +69,7 @@ public class ScheduledThreadPoolExecutor ### 2.3 Executor 框架的使用示意图 -![Executor 框架的使用示意图](images/java线程池学习总结/Executor框架的使用示意图.png) +![Executor 框架的使用示意图](images/java-thread-pool-summary/Executor框架的使用示意图.png) 1. **主线程首先要创建实现 `Runnable` 或者 `Callable` 接口的任务对象。** 2. **把创建完成的实现 `Runnable`/`Callable`接口的 对象直接交给 `ExecutorService` 执行**: `ExecutorService.execute(Runnable command)`)或者也可以把 `Runnable` 对象或`Callable` 对象提交给 `ExecutorService` 执行(`ExecutorService.submit(Runnable task)`或 `ExecutorService.submit(Callable task)`)。 @@ -129,7 +129,7 @@ public class ScheduledThreadPoolExecutor 下面这张图可以加深你对线程池中各个参数的相互关系的理解(图片来源:《Java 性能调优实战》): -![线程池各个参数的关系](images/java线程池学习总结/线程池各个参数之间的关系.png) +![线程池各个参数的关系](images/java-thread-pool-summary/线程池各个参数之间的关系.png) **`ThreadPoolExecutor` 饱和策略定义:** @@ -160,7 +160,7 @@ public class ScheduledThreadPoolExecutor > - **`CachedThreadPool` 和 `ScheduledThreadPool`** : 允许创建的线程数量为 `Integer.MAX_VALUE` ,可能会创建大量线程,从而导致 OOM。 **方式一:通过`ThreadPoolExecutor`构造函数实现(推荐)** -![通过构造方法实现](images/java线程池学习总结/threadpoolexecutor构造函数.png) +![通过构造方法实现](images/java-thread-pool-summary/threadpoolexecutor构造函数.png) **方式二:通过 `Executor` 框架的工具类 `Executors` 来实现** 我们可以创建三种类型的 `ThreadPoolExecutor`: @@ -171,7 +171,7 @@ public class ScheduledThreadPoolExecutor 对应 Executors 工具类中的方法如图所示: -![通过Executor 框架的工具类Executors来实现](images/java线程池学习总结/Executors工具类.png) +![通过Executor 框架的工具类Executors来实现](images/java-thread-pool-summary/Executors工具类.png) ## 四 ThreadPoolExecutor 使用+原理分析 @@ -693,7 +693,7 @@ Wed Nov 13 13:40:43 CST 2019::pool-1-thread-5 `FixedThreadPool` 的 `execute()` 方法运行示意图(该图片来源:《Java 并发编程的艺术》): -![FixedThreadPool的execute()方法运行示意图](images/java线程池学习总结/FixedThreadPool.png) +![FixedThreadPool的execute()方法运行示意图](images/java-thread-pool-summary/FixedThreadPool.png) **上图说明:** @@ -743,7 +743,7 @@ Wed Nov 13 13:40:43 CST 2019::pool-1-thread-5 #### 5.2.2 执行任务过程介绍 `SingleThreadExecutor` 的运行示意图(该图片来源:《Java 并发编程的艺术》): -![SingleThreadExecutor的运行示意图](images/java线程池学习总结/SingleThreadExecutor.png) +![SingleThreadExecutor的运行示意图](images/java-thread-pool-summary/SingleThreadExecutor.png) **上图说明** : @@ -787,7 +787,7 @@ Wed Nov 13 13:40:43 CST 2019::pool-1-thread-5 #### 5.3.2 执行任务过程介绍 `CachedThreadPool` 的 `execute()` 方法的执行示意图(该图片来源:《Java 并发编程的艺术》): -![CachedThreadPool的execute()方法的执行示意图](images/java线程池学习总结/CachedThreadPool-execute.png) +![CachedThreadPool的execute()方法的执行示意图](images/java-thread-pool-summary/CachedThreadPool-execute.png) **上图说明:** @@ -818,7 +818,7 @@ Wed Nov 13 13:40:43 CST 2019::pool-1-thread-5 ### 6.2 运行机制 -![ScheduledThreadPoolExecutor运行机制](images/java线程池学习总结/ScheduledThreadPoolExecutor机制.png) +![ScheduledThreadPoolExecutor运行机制](images/java-thread-pool-summary/ScheduledThreadPoolExecutor机制.png) **`ScheduledThreadPoolExecutor` 的执行主要分为两大部分:** @@ -833,7 +833,7 @@ Wed Nov 13 13:40:43 CST 2019::pool-1-thread-5 ### 6.3 ScheduledThreadPoolExecutor 执行周期任务的步骤 -![ScheduledThreadPoolExecutor执行周期任务的步骤](images/java线程池学习总结/ScheduledThreadPoolExecutor执行周期任务步骤.png) +![ScheduledThreadPoolExecutor执行周期任务的步骤](images/java-thread-pool-summary/ScheduledThreadPoolExecutor执行周期任务步骤.png) 1. 线程 1 从 `DelayQueue` 中获取已到期的 `ScheduledFutureTask(DelayQueue.take())`。到期任务是指 `ScheduledFutureTask`的 time 大于等于当前系统的时间; 2. 线程 1 执行这个 `ScheduledFutureTask`; diff --git a/index.html b/index.html index 8f2161cb..6fdc0cbc 100755 --- a/index.html +++ b/index.html @@ -9,7 +9,6 @@ name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" /> -