<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>JDK on 知识铺的博客</title>
    <link>https://index.zshipu.com/geek/tags/JDK/</link>
    <description>Recent content in JDK on 知识铺的博客</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <lastBuildDate>Wed, 06 Mar 2024 11:03:00 +0000</lastBuildDate>
    <atom:link href="https://index.zshipu.com/geek/tags/JDK/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>详解AbstractQueuedSynchronizer</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/%E8%AF%A6%E8%A7%A3AbstractQueuedSynchronizer/</link>
      <pubDate>Wed, 06 Mar 2024 11:03:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/%E8%AF%A6%E8%A7%A3AbstractQueuedSynchronizer/</guid>
      <description>简介 AbstractQueuedSynchronizer 是 Doug Lea 大师创作的用来构建锁或者其他同步组件的基础框架类。J.U.C 中许多锁和并发工具类的核心实现都依赖于 AQS，如：ReentrantLock、ReentrantReadWriteLock、Semaphore、CountDownLatch 等。 AQS 的源码中 方法很多，但主要做了三</description>
    </item>
    <item>
      <title>Semaphore</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/Semaphore/</link>
      <pubDate>Wed, 06 Mar 2024 11:02:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/Semaphore/</guid>
      <description>Semaphore 信号量，可用于控制一定时间内，并发执行的线程数，基于 AQS 实现。可应用于网关限流、资源限制 (如 最大可发起连接数)。由于 release() 释放许可时，未对释放许可数做限制，所以可以通过该方法增加总的许可数量。 获取许可 支持公平和非公平模式，默认非公平模式。公平模式无论是否有许可，都会先判断是否有线程在</description>
    </item>
    <item>
      <title>Lock锁组件</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/Lock%E9%94%81%E7%BB%84%E4%BB%B6/</link>
      <pubDate>Wed, 06 Mar 2024 11:01:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/Lock%E9%94%81%E7%BB%84%E4%BB%B6/</guid>
      <description>类图结构 J.U.C 的锁组件中 类相对较少，从 JDK 相应的包中也能看出来，下图标记了其中最主要的几个接口和类，也是本文要分析的重点。 下图 将这几个接口和类 以类图的方式展现出来，其中包含了它们所声明的主要方法。 Lock 组件 Lock 组件的结构很简单，只有一个接口和一个实现类，源码如下。 1 2 3 4 5 6 7 8 9 10 11 12 13 14</description>
    </item>
    <item>
      <title>JUC并发包UML全量类图</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/JUC%E5%B9%B6%E5%8F%91%E5%8C%85UML%E5%85%A8%E9%87%8F%E7%B1%BB%E5%9B%BE/</link>
      <pubDate>Wed, 06 Mar 2024 11:00:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/JUC%E5%B9%B6%E5%8F%91%E5%8C%85UML%E5%85%A8%E9%87%8F%E7%B1%BB%E5%9B%BE/</guid>
      <description>利用 IDEA 整理类图还是蛮不错的，虽然这个功能 BUG 很多。下图是 J.U.C 并发包中所有类组成的类图，源码看多了 再去整理这个图，感觉还是很爽的。 根据功能，主要划分了六个部分，其中比较重要的是：线程池及其相关类、并发容器、AQS 与锁与同步工具类、原子类。图可能整理的不够细致，但看着这些类，回想一下其中</description>
    </item>
    <item>
      <title>Executor线程池组件</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/Executor%E7%BA%BF%E7%A8%8B%E6%B1%A0%E7%BB%84%E4%BB%B6/</link>
      <pubDate>Wed, 06 Mar 2024 10:59:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/concurrentCoding/Executor%E7%BA%BF%E7%A8%8B%E6%B1%A0%E7%BB%84%E4%BB%B6/</guid>
      <description>线程池核心组件图解 看源码之前，先了解一下该组件 最主要的几个 接口、抽象类和实现类的结构关系。 该组件中，Executor 和 ExecutorService 接口 定义了线程池最核心的几个方法，提交任务 submit ()、关闭线程池 shutdown()。抽象类 AbstractExecutorService 主要对公共行为 submit()系列方法进行了实现，这些 submit()</description>
    </item>
    <item>
      <title>TreeSet</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/collection/TreeSet/</link>
      <pubDate>Wed, 06 Mar 2024 10:58:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/collection/TreeSet/</guid>
      <description>TreeSet 是 Java 中实现有序集合的一个类，它基于红黑树实现，可以保证集合中的元素按照自然顺序或自定义顺序排序。在本文中，我们将详细介绍 TreeSet 的实现原理，并结合源码和示例代码进行解释。 TreeSet 的底层数据结构 TreeSet 的底层数据结构是红黑树，红黑树是一种自平衡二叉搜索树，它可以保证在插入、删除和查找元素时，时间复</description>
    </item>
    <item>
      <title>LinkedList</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/collection/LinkedList/</link>
      <pubDate>Wed, 06 Mar 2024 10:57:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/collection/LinkedList/</guid>
      <description>LinkedList LinkedList 是 Java 中实现双向链表的一个类，它实现了 List 接口和 Deque 接口。LinkedList 可以用作栈、队列和双端队列。在本文中，我们将详细介绍 LinkedList 的实现原理，并结合源码和示例代码进行解释。 LinkedList 的结点 LinkedList 的结点是一个静态内部类 Node，它包含三个属性：item 表示结点存储的元素，next 表示下一个结点</description>
    </item>
    <item>
      <title>LinkedHashMap</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/collection/LinkedHashMap/</link>
      <pubDate>Wed, 06 Mar 2024 10:56:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/collection/LinkedHashMap/</guid>
      <description>HashMap 大家都清楚，底层是 数组 + (链表 / 红黑树)，元素是无序的，而 LinkedHashMap 则比 HashMap 多了这一个功能，并且，LinkedHashMap 的有序可以按两种顺序排列，一种是按照插入的顺序，一种是按照访问的顺序（初始化 LinkedHashMap 对象时设置 accessOrder 参数为 true），而其内部是靠 建立一个双向链表 来维护这个顺序的，在每次插入</description>
    </item>
    <item>
      <title>HashSet</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/collection/HashSet/</link>
      <pubDate>Wed, 06 Mar 2024 10:55:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/collection/HashSet/</guid>
      <description>HashSet 本身并没有什么特别的东西，它提供的所有集合核心功能，都是基于 HashMap 来实现的。如果了解 HashMap 源码的实现，HashSet 源码看起来跟玩一样。我的博客中有专门分析 HashMap 源码的文章，不熟悉的请自行翻阅。 HashSet 的特点如下： 内部使用 HashMap 的 key 存储元素，以此来保证元素不重复； HashSet 是无序的，因为 HashMap 的 key 是无序的； HashSet 中</description>
    </item>
    <item>
      <title>HashMap</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/collection/HashMap/</link>
      <pubDate>Wed, 06 Mar 2024 10:54:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/collection/HashMap/</guid>
      <description>作为工作中最重要、最常用的容器之一，当然还是要自己动手写一篇 HashMap 的源码解析来加深对其的印象咯，而且它的设计与实现 也有很多值得学习的地方。 源码赏析 JDK1.8 的 HashMap 底层使用的是 动态数组，数组中元素存放的是 链表或红黑树。核心源码如下。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32</description>
    </item>
    <item>
      <title>ConcurrentHashMap</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/collection/ConcurrentHashMap/</link>
      <pubDate>Wed, 06 Mar 2024 10:53:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/collection/ConcurrentHashMap/</guid>
      <description>HashMap 源码中主要了解其核心源码及实现逻辑。ConcurrentHashMap 就不再重复那些数据结构相关的内容咯，这里重点看一下它的并发安全实现。源码如下。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65</description>
    </item>
    <item>
      <title>ArrayList</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/collection/ArrayList/</link>
      <pubDate>Wed, 06 Mar 2024 10:52:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/collection/ArrayList/</guid>
      <description>一文直接带你吃透 ArrayList ArrayList 是日常开发中相当常见、面试也相当常考的一种 JDK 集合类，了解并熟悉、甚至能实现一个 ArrayList 对面试、提升自己编码功底大有益处。 一、写给小白 ArrayList 简单使用技巧 这部分是 ArrayList 的简单使用技巧，主要是介绍 ArrayList 的几个常见方法。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 /**</description>
    </item>
    <item>
      <title>ThreadLocal</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/basic/ThreadLocal/</link>
      <pubDate>Wed, 06 Mar 2024 10:51:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/basic/ThreadLocal/</guid>
      <description>前面我们分析了 Thread 类的源码，有了前面的铺垫，通过源码 理解 ThreadLocal 的秘密就容易多了。 ThreadLocal 类 提供了 get/set 线程局部变量的实现，ThreadLocal 成员变量与正常的成员变量不同，每个线程都可以通过 ThreadLocal 成员变量 get/set 自己的专属值。ThreadLocal 实例 通常是类中的私有静态变量，常用于将状态与线程关联，例</description>
    </item>
    <item>
      <title>Thread</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/basic/Thread/</link>
      <pubDate>Wed, 06 Mar 2024 10:50:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/basic/Thread/</guid>
      <description>本来想看 ThreadLocal 的源码的，但发现其中最重要的 get/set 方法都是操纵的 Thread 类 中的 threadLocals 变量 (java.lang.ThreadLocal.ThreadLocalMap)，索性先来看一下 Thread 的源码吧，可以留意一下其中与 ThreadLocal 相关的属性，这样下次阅读 ThreadLocal 的核心 API 时，就能够轻易理解其原理咯。不多 BB，直接上硬菜。 实现</description>
    </item>
    <item>
      <title>String</title>
      <link>https://index.zshipu.com/geek/post/code/docs/JDK/basic/String/</link>
      <pubDate>Wed, 06 Mar 2024 10:49:00 +0000</pubDate>
      <guid>https://index.zshipu.com/geek/post/code/docs/JDK/basic/String/</guid>
      <description>String 的源码大家应该都能看懂，这里就不一一分析咯，重点讲一下 equals()和 hashcode()方法，然后看一下 String 类常用方法的实现，就当一起温习一下咯。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65</description>
    </item>
  </channel>
</rss>
