diff --git a/README.md b/README.md index 4230b05..094119d 100644 --- a/README.md +++ b/README.md @@ -221,15 +221,25 @@ * 努力编写中... ## 番外篇(JDK 1.8) - -* [Executor 线程池组件 源码赏析](docs/JDK/Executor线程池组件.md) -* [Lock 锁组件 源码赏析](docs/JDK/Lock锁组件.md) -* [Thread类 源码赏析](docs/JDK/Thread.md) -* [ThreadLocal类 源码赏析](docs/JDK/ThreadLocal.md) -* [HashMap类 源码赏析](docs/JDK/HashMap.md) -* [ConcurrentHashMap类 源码赏析](docs/JDK/ConcurrentHashMap.md) -* [String类 源码赏析](docs/JDK/String.md) - +### 基础类库 +* [String类 源码赏析](docs/JDK/basic/String.md) +* [Thread类 源码赏析](docs/JDK/basic/Thread.md) +* [ThreadLocal类 源码赏析](docs/JDK/basic/ThreadLocal.md) +### 集合 +* [HashMap类 源码赏析](docs/JDK/collection/HashMap.md) +* [ConcurrentHashMap类 源码赏析](docs/JDK/collection/ConcurrentHashMap.md) +* [LinkedHashMap类 源码赏析](docs/JDK/collection/LinkedHashMap.md) +* [ArrayList类 源码赏析](docs/JDK/collection/ArrayList.md) +* [LinkedList类 源码赏析](docs/JDK/collection/LinkedList.md) +* [HashSet类 源码赏析](docs/JDK/collection/HashSet.md) +* [TreeSet类 源码赏析](docs/JDK/collection/TreeSet.md) +### 并发编程 +* [Executor 线程池组件 源码赏析](docs/JDK/concurrentCoding/Executor线程池组件.md) +* [Lock 锁组件 源码赏析](docs/JDK/concurrentCoding/Lock锁组件.md) +* [详解AbstractQueuedSynchronizer抽象类](docs/JDK/concurrentCoding/详解AbstractQueuedSynchronizer.md) +* [CountdownLatch类 源码赏析](docs/JDK/concurrentCoding/CountdownLatch.md) +* [CyclicBarrier类 源码赏析](docs/JDK/concurrentCoding/CyclicBarrier.md) +* [Semaphore类 源码赏析](docs/JDK/concurrentCoding/Semaphore.md) ## 学习心得 ### 个人经验 diff --git a/docs/JDK/String.md b/docs/JDK/basic/String.md similarity index 100% rename from docs/JDK/String.md rename to docs/JDK/basic/String.md diff --git a/docs/JDK/Thread.md b/docs/JDK/basic/Thread.md similarity index 99% rename from docs/JDK/Thread.md rename to docs/JDK/basic/Thread.md index 6dfeb66..5324fa2 100644 --- a/docs/JDK/Thread.md +++ b/docs/JDK/basic/Thread.md @@ -317,4 +317,4 @@ public class Thread implements Runnable { ``` 之前一直对线程状态 及 状态切换的概念模糊不清,现在通过源码中对线程状态的定义,我们可以画张图来重新回顾一下,以使我们对其有更加深刻的理解。 -![avatar](../../images/JDK1.8/ThreadStatusChange.png) \ No newline at end of file +![avatar](../../../images/JDK1.8/ThreadStatusChange.png) \ No newline at end of file diff --git a/docs/JDK/ThreadLocal.md b/docs/JDK/basic/ThreadLocal.md similarity index 99% rename from docs/JDK/ThreadLocal.md rename to docs/JDK/basic/ThreadLocal.md index 1f86279..4c24dc5 100644 --- a/docs/JDK/ThreadLocal.md +++ b/docs/JDK/basic/ThreadLocal.md @@ -258,7 +258,7 @@ public class ThreadLocal { ``` 简单画个图总结一下 ThreadLocal 的原理,如下。 -![avatar](../../images/JDK1.8/ThreadLocal原理.png) +![avatar](../../../images/JDK1.8/ThreadLocal原理.png) 最后强调一下 ThreadLocal的使用注意事项: diff --git a/docs/JDK/collection/ArrayList.md b/docs/JDK/collection/ArrayList.md new file mode 100644 index 0000000..fcb5dbe --- /dev/null +++ b/docs/JDK/collection/ArrayList.md @@ -0,0 +1 @@ +努力编写中... \ No newline at end of file diff --git a/docs/JDK/ConcurrentHashMap.md b/docs/JDK/collection/ConcurrentHashMap.md similarity index 100% rename from docs/JDK/ConcurrentHashMap.md rename to docs/JDK/collection/ConcurrentHashMap.md diff --git a/docs/JDK/HashMap.md b/docs/JDK/collection/HashMap.md similarity index 100% rename from docs/JDK/HashMap.md rename to docs/JDK/collection/HashMap.md diff --git a/docs/JDK/collection/HashSet.md b/docs/JDK/collection/HashSet.md new file mode 100644 index 0000000..fcb5dbe --- /dev/null +++ b/docs/JDK/collection/HashSet.md @@ -0,0 +1 @@ +努力编写中... \ No newline at end of file diff --git a/docs/JDK/collection/LinkedHashMap.md b/docs/JDK/collection/LinkedHashMap.md new file mode 100644 index 0000000..fcb5dbe --- /dev/null +++ b/docs/JDK/collection/LinkedHashMap.md @@ -0,0 +1 @@ +努力编写中... \ No newline at end of file diff --git a/docs/JDK/collection/LinkedList.md b/docs/JDK/collection/LinkedList.md new file mode 100644 index 0000000..fcb5dbe --- /dev/null +++ b/docs/JDK/collection/LinkedList.md @@ -0,0 +1 @@ +努力编写中... \ No newline at end of file diff --git a/docs/JDK/collection/TreeSet.md b/docs/JDK/collection/TreeSet.md new file mode 100644 index 0000000..fcb5dbe --- /dev/null +++ b/docs/JDK/collection/TreeSet.md @@ -0,0 +1 @@ +努力编写中... \ No newline at end of file diff --git a/docs/JDK/concurrentCoding/CountdownLatch.md b/docs/JDK/concurrentCoding/CountdownLatch.md new file mode 100644 index 0000000..fcb5dbe --- /dev/null +++ b/docs/JDK/concurrentCoding/CountdownLatch.md @@ -0,0 +1 @@ +努力编写中... \ No newline at end of file diff --git a/docs/JDK/concurrentCoding/CyclicBarrier.md b/docs/JDK/concurrentCoding/CyclicBarrier.md new file mode 100644 index 0000000..fcb5dbe --- /dev/null +++ b/docs/JDK/concurrentCoding/CyclicBarrier.md @@ -0,0 +1 @@ +努力编写中... \ No newline at end of file diff --git a/docs/JDK/Executor线程池组件.md b/docs/JDK/concurrentCoding/Executor线程池组件.md similarity index 99% rename from docs/JDK/Executor线程池组件.md rename to docs/JDK/concurrentCoding/Executor线程池组件.md index 87cee44..f42404a 100644 --- a/docs/JDK/Executor线程池组件.md +++ b/docs/JDK/concurrentCoding/Executor线程池组件.md @@ -1,7 +1,7 @@ ## 线程池核心组件图解 看源码之前,先了解一下该组件 最主要的几个 接口、抽象类和实现类的结构关系。 -![avatar](../../images/JDK1.8/线程池组件类图.png) +![avatar](../../../images/JDK1.8/线程池组件类图.png) 该组件中,Executor 和 ExecutorService接口 定义了线程池最核心的几个方法,提交任务submit ()、关闭线程池shutdown()。抽象类 AbstractExecutorService 主要对公共行为 submit()系列方法进行了实现,这些 submit()方法 的实现使用了 模板方法模式,其中调用的 execute()方法 是未实现的 来自 Executor接口 的方法。实现类 ThreadPoolExecutor 则对线程池进行了具体而复杂的实现。 diff --git a/docs/JDK/Lock锁组件.md b/docs/JDK/concurrentCoding/Lock锁组件.md similarity index 99% rename from docs/JDK/Lock锁组件.md rename to docs/JDK/concurrentCoding/Lock锁组件.md index a5b749d..7562da0 100644 --- a/docs/JDK/Lock锁组件.md +++ b/docs/JDK/concurrentCoding/Lock锁组件.md @@ -1,11 +1,11 @@ ## 类图结构 J.U.C 的锁组件中 类相对较少,从JDK相应的包中也能看出来,下图标记了其中最主要的几个接口和类,也是本文要分析的重点。 -![avatar](../../images/JDK1.8/JUC的locks包.png) +![avatar](../../../images/JDK1.8/JUC的locks包.png) 下图 将这几个接口和类 以类图的方式展现出来,其中包含了它们所声明的主要方法。 -![avatar](../../images/JDK1.8/JUC锁组件类图.png) +![avatar](../../../images/JDK1.8/JUC锁组件类图.png) ## Lock 组件 Lock 组件的结构很简单,只有一个接口和一个实现类,源码如下。 diff --git a/docs/JDK/concurrentCoding/Semaphore.md b/docs/JDK/concurrentCoding/Semaphore.md new file mode 100644 index 0000000..fcb5dbe --- /dev/null +++ b/docs/JDK/concurrentCoding/Semaphore.md @@ -0,0 +1 @@ +努力编写中... \ No newline at end of file diff --git a/docs/JDK/concurrentCoding/详解AbstractQueuedSynchronizer.md b/docs/JDK/concurrentCoding/详解AbstractQueuedSynchronizer.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/JDK/kong.md b/docs/JDK/kong.md new file mode 100644 index 0000000..fcb5dbe --- /dev/null +++ b/docs/JDK/kong.md @@ -0,0 +1 @@ +努力编写中... \ No newline at end of file