<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"><channel><title>一起看星星</title><link>https://lookstar.asia/</link><atom:link href="https://lookstar.asia/rss.xml" rel="self" type="application/rss+xml"/><description>一起看星星</description><generator>Halo v2.26.0</generator><language>zh-cn</language><image><url>https://lookstar.asia/upload/ChatGPT%20Image%202026%E5%B9%B48%E6%9C%8826%E6%97%A5%2020_14_59.png</url><title>一起看星星</title><link>https://lookstar.asia/</link></image><lastBuildDate>Tue, 3 Nov 2026 03:35:30 GMT</lastBuildDate><item><title><![CDATA[Java 多线程：线程安全、原子性、可见性与有序性]]></title><link>https://lookstar.asia/archives/XcaduXmj</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20%E5%A4%9A%E7%BA%BF%E7%A8%8B%EF%BC%9A%E7%BA%BF%E7%A8%8B%E5%AE%89%E5%85%A8%E3%80%81%E5%8E%9F%E5%AD%90%E6%80%A7%E3%80%81%E5%8F%AF%E8%A7%81%E6%80%A7%E4%B8%8E%E6%9C%89%E5%BA%8F%E6%80%A7&amp;url=/archives/XcaduXmj" width="1" height="1" alt="" style="opacity:0;">一、线程安全与三大特性 1. 什么是线程安全？ 线程安全是指：多个线程并发访问共享数据时，程序仍然能够得到符合预期的正确结果。 例如，商品库存为 100，两个线程分别扣减一次库存： stock--; 正常情况下，最终库存应该是 98。 但在多线程环境中，可能发生： 初始库存：100 线程 A：读取]]></description><guid isPermaLink="false">/archives/XcaduXmj</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Tue, 3 Nov 2026 03:34:50 GMT</pubDate></item><item><title><![CDATA[Java 多线程：线程中断、等待与唤醒]]></title><link>https://lookstar.asia/archives/EDvQadf6</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20%E5%A4%9A%E7%BA%BF%E7%A8%8B%EF%BC%9A%E7%BA%BF%E7%A8%8B%E4%B8%AD%E6%96%AD%E3%80%81%E7%AD%89%E5%BE%85%E4%B8%8E%E5%94%A4%E9%86%92&amp;url=/archives/EDvQadf6" width="1" height="1" alt="" style="opacity:0;">一、Java 线程中断机制 1. 什么是线程中断？ Java 使用协作式中断机制，通过 interrupt() 通知目标线程需要停止当前任务，但不会强制终止线程。 每个线程都有自己的中断状态，可以简单理解为： false：没有收到中断请求。 true：收到中断请求。 调用 inte]]></description><guid isPermaLink="false">/archives/EDvQadf6</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Tue, 3 Nov 2026 00:52:32 GMT</pubDate></item><item><title><![CDATA[Java 多线程：线程的创建方式与生命周期]]></title><link>https://lookstar.asia/archives/eWZmCf9d</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20%E5%A4%9A%E7%BA%BF%E7%A8%8B%EF%BC%9A%E7%BA%BF%E7%A8%8B%E7%9A%84%E5%88%9B%E5%BB%BA%E6%96%B9%E5%BC%8F%E4%B8%8E%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F&amp;url=/archives/eWZmCf9d" width="1" height="1" alt="" style="opacity:0;">一、Java 创建线程的几种方式 Java 中常见的线程创建与执行方式有以下几种：]]></description><guid isPermaLink="false">/archives/eWZmCf9d</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Mon, 2 Nov 2026 22:51:22 GMT</pubDate></item><item><title><![CDATA[Java NIO：Reactor 模型与 Netty EventLoop 原理]]></title><link>https://lookstar.asia/archives/J8cV9GcN</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20NIO%EF%BC%9AReactor%20%E6%A8%A1%E5%9E%8B%E4%B8%8E%20Netty%20EventLoop%20%E5%8E%9F%E7%90%86&amp;url=/archives/J8cV9GcN" width="1" height="1" alt="" style="opacity:0;">一、Reactor 模型的基本原理 1. 什么是 Reactor？ Reactor 是一种基于事件驱动的设计模式，主要解决高并发网络通信中的事件监听和分发问题。 先回顾传统 BIO 的处理方式。 假设服务器同时有 1000 个客户端连接，传统 BIO 通常采用一个连接对应一个线程的方式： 客户端 A]]></description><guid isPermaLink="false">/archives/J8cV9GcN</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Mon, 2 Nov 2026 22:30:35 GMT</pubDate></item><item><title><![CDATA[Java 多线程：线程的创建方式与生命周期]]></title><link>https://lookstar.asia/archives/29Z9mF5h</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20%E5%A4%9A%E7%BA%BF%E7%A8%8B%EF%BC%9A%E7%BA%BF%E7%A8%8B%E7%9A%84%E5%88%9B%E5%BB%BA%E6%96%B9%E5%BC%8F%E4%B8%8E%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F&amp;url=/archives/29Z9mF5h" width="1" height="1" alt="" style="opacity:0;">一、Java 创建线程的几种方式 Java 中常见的线程创建与执行方式有以下几种：]]></description><guid isPermaLink="false">/archives/29Z9mF5h</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Mon, 2 Nov 2026 15:25:18 GMT</pubDate></item><item><title><![CDATA[Java 多线程：进程、线程与并发基础]]></title><link>https://lookstar.asia/archives/qihLndWo</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20%E5%A4%9A%E7%BA%BF%E7%A8%8B%EF%BC%9A%E8%BF%9B%E7%A8%8B%E3%80%81%E7%BA%BF%E7%A8%8B%E4%B8%8E%E5%B9%B6%E5%8F%91%E5%9F%BA%E7%A1%80&amp;url=/archives/qihLndWo" width="1" height="1" alt="" style="opacity:0;">一、进程与线程 1. 什么是进程？ 进程（Process）是操作系统进行资源分配和管理的基本单位。 简单理解：当我们启动一个 Java 程序时，操作系统会为这个程序创建一个进程。 例如，启动 Spring Boot 项目： java -jar application.jar 操作系统会启动一个 Ja]]></description><guid isPermaLink="false">/archives/qihLndWo</guid><dc:creator>Administrator</dc:creator><category>技术</category><category>默认分类</category><pubDate>Mon, 2 Nov 2026 13:43:31 GMT</pubDate></item><item><title><![CDATA[Java NIO：DirectBuffer、内存映射与零拷贝原理]]></title><link>https://lookstar.asia/archives/akwElQEC</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20NIO%EF%BC%9ADirectBuffer%E3%80%81%E5%86%85%E5%AD%98%E6%98%A0%E5%B0%84%E4%B8%8E%E9%9B%B6%E6%8B%B7%E8%B4%9D%E5%8E%9F%E7%90%86&amp;url=/archives/akwElQEC" width="1" height="1" alt="" style="opacity:0;">一、HeapByteBuffer 与 DirectByteBuffer 1. HeapByteBuffer：堆内存缓冲区 之前学习 ByteBuffer 时，主要使用： ByteBuffer buffer = ByteBuffer.allocate(1024); 这种方式创建的是 HeapByteB]]></description><guid isPermaLink="false">/archives/akwElQEC</guid><dc:creator>Administrator</dc:creator><category>技术</category><category>默认分类</category><pubDate>Mon, 2 Nov 2026 13:20:12 GMT</pubDate></item><item><title><![CDATA[Java NIO：FileChannel 文件操作、分散读取与聚集写入]]></title><link>https://lookstar.asia/archives/UdiyfYXp</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20NIO%EF%BC%9AFileChannel%20%E6%96%87%E4%BB%B6%E6%93%8D%E4%BD%9C%E3%80%81%E5%88%86%E6%95%A3%E8%AF%BB%E5%8F%96%E4%B8%8E%E8%81%9A%E9%9B%86%E5%86%99%E5%85%A5&amp;url=/archives/UdiyfYXp" width="1" height="1" alt="" style="opacity:0;">一、FileChannel 的工作原理 1. 什么是 FileChannel？ FileChannel 是 Java NIO 提供的文件通道，主要用于文件数据的读取、写入和传输。 在 NIO 中，文件数据通常通过 FileChannel 和 ByteBuffer 配合完成传输。 读取文件： 磁盘文件]]></description><guid isPermaLink="false">/archives/UdiyfYXp</guid><dc:creator>Administrator</dc:creator><category>技术</category><category>默认分类</category><pubDate>Mon, 2 Nov 2026 12:45:24 GMT</pubDate></item><item><title><![CDATA[Java NIO：TCP 服务端与客户端、半包处理及非阻塞写入]]></title><link>https://lookstar.asia/archives/VP1S6Yjn</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20NIO%EF%BC%9ATCP%20%E6%9C%8D%E5%8A%A1%E7%AB%AF%E4%B8%8E%E5%AE%A2%E6%88%B7%E7%AB%AF%E3%80%81%E5%8D%8A%E5%8C%85%E5%A4%84%E7%90%86%E5%8F%8A%E9%9D%9E%E9%98%BB%E5%A1%9E%E5%86%99%E5%85%A5&amp;url=/archives/VP1S6Yjn" width="1" height="1" alt="" style="opacity:0;">一、NIO TCP 服务端的工作原理 Java NIO 通过 Selector、Channel 和 Buffer 实现非阻塞网络通信。 三个核心组件：]]></description><guid isPermaLink="false">/archives/VP1S6Yjn</guid><dc:creator>Administrator</dc:creator><category>技术</category><category>默认分类</category><pubDate>Mon, 2 Nov 2026 08:23:50 GMT</pubDate></item><item><title><![CDATA[Java NIO：Selector 选择器与 IO 多路复用]]></title><link>https://lookstar.asia/archives/kp3S5U8J</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20NIO%EF%BC%9ASelector%20%E9%80%89%E6%8B%A9%E5%99%A8%E4%B8%8E%20IO%20%E5%A4%9A%E8%B7%AF%E5%A4%8D%E7%94%A8&amp;url=/archives/kp3S5U8J" width="1" height="1" alt="" style="opacity:0;">一、什么是 Selector？ Selector（选择器）是 Java NIO 的核心组件之一，主要用于监听多个 Channel 的 IO 就绪事件。 传统 BIO 通常采用一个客户端连接对应一个处理线程的方式。当客户端数量较多时，大量线程可能处于阻塞等待状态，增加内存占用和线程切换成本。 Java]]></description><guid isPermaLink="false">/archives/kp3S5U8J</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Mon, 2 Nov 2026 06:25:49 GMT</pubDate></item><item><title><![CDATA[Java NIO：Channel 通道的工作原理与数据读写]]></title><link>https://lookstar.asia/archives/eWzA9xvF</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20NIO%EF%BC%9AChannel%20%E9%80%9A%E9%81%93%E7%9A%84%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%E4%B8%8E%E6%95%B0%E6%8D%AE%E8%AF%BB%E5%86%99&amp;url=/archives/eWzA9xvF" width="1" height="1" alt="" style="opacity:0;">一、Channel 是什么？ Channel（通道）是 Java NIO 的核心组件之一，主要负责数据的读取和写入。 在传统 BIO 中，数据主要通过 InputStream 和 OutputStream 进行传输；在 NIO 中，数据通常通过 Channel 和 Buffer 配合完成传输。 三个]]></description><guid isPermaLink="false">/archives/eWzA9xvF</guid><dc:creator>Administrator</dc:creator><category>技术</category><category>默认分类</category><pubDate>Sun, 1 Nov 2026 08:46:47 GMT</pubDate></item><item><title><![CDATA[Netty：Pipeline 消息传播、Handler 选型与 Reactor 模型易错点解析]]></title><link>https://lookstar.asia/archives/fRkUUw0w</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Netty%EF%BC%9APipeline%20%E6%B6%88%E6%81%AF%E4%BC%A0%E6%92%AD%E3%80%81Handler%20%E9%80%89%E5%9E%8B%E4%B8%8E%20Reactor%20%E6%A8%A1%E5%9E%8B%E6%98%93%E9%94%99%E7%82%B9%E8%A7%A3%E6%9E%90&amp;url=/archives/fRkUUw0w" width="1" height="1" alt="" style="opacity:0;">Netty 的网络通信涉及多个层次：IO 多路复用负责监听就绪事件，Reactor 负责组织事件分发，Pipeline 负责事件传播，Handler 负责具体业务处理，Future 则用于表示异步操作的执行结果。 如果混淆这些概念，就容易在消息编码、引用计数、线程中断和资源关闭等方面出现错误理解。]]></description><guid isPermaLink="false">/archives/fRkUUw0w</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Sun, 1 Nov 2026 02:22:00 GMT</pubDate></item><item><title><![CDATA[Java NIO：compact() 的正确理解与常见问题]]></title><link>https://lookstar.asia/archives/1fkTN6HC</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20NIO%EF%BC%9Acompact%28%29%20%E7%9A%84%E6%AD%A3%E7%A1%AE%E7%90%86%E8%A7%A3%E4%B8%8E%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98&amp;url=/archives/1fkTN6HC" width="1" height="1" alt="" style="opacity:0;">一、compact() 是什么？ compact() 的作用是：保留 Buffer 中尚未读取的数据，将它们移动到缓冲区开头，并将 position 设置为剩余数据的长度，以便继续写入新数据。 它主要解决一个问题： 当 Buffer 中的数据没有处理完，又需要接收新数据时，如何保留之前未处理的数据？]]></description><guid isPermaLink="false">/archives/1fkTN6HC</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Sun, 1 Nov 2026 02:16:15 GMT</pubDate></item><item><title><![CDATA[Netty：核心原理串联与综合场景分析]]></title><link>https://lookstar.asia/archives/8JpbFAhV</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Netty%EF%BC%9A%E6%A0%B8%E5%BF%83%E5%8E%9F%E7%90%86%E4%B8%B2%E8%81%94%E4%B8%8E%E7%BB%BC%E5%90%88%E5%9C%BA%E6%99%AF%E5%88%86%E6%9E%90&amp;url=/archives/8JpbFAhV" width="1" height="1" alt="" style="opacity:0;">一、Netty 服务端的整体工作流程 典型 TCP 服务端从客户端连接到消息响应，大致经历： 客户端发起 TCP 连接 │ ▼ Boss EventLoopGroup 接收连接 │ ▼ Worker EventLoopGroup 管理客]]></description><guid isPermaLink="false">/archives/8JpbFAhV</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Sun, 1 Nov 2026 02:13:20 GMT</pubDate></item><item><title><![CDATA[Netty：TCP_NODELAY、Nagle 算法与服务端连接管理]]></title><link>https://lookstar.asia/archives/r7WmXe1T</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Netty%EF%BC%9ATCP_NODELAY%E3%80%81Nagle%20%E7%AE%97%E6%B3%95%E4%B8%8E%E6%9C%8D%E5%8A%A1%E7%AB%AF%E8%BF%9E%E6%8E%A5%E7%AE%A1%E7%90%86&amp;url=/archives/r7WmXe1T" width="1" height="1" alt="" style="opacity:0;">一、Nagle 算法与 TCP_NODELAY 1. Nagle 算法解决什么问题？ TCP 是字节流协议。应用程序可能频繁写入很少的数据，例如每次只写入几个字节。如果每次小数据写入都立即形成独立 TCP 数据段，可能产生大量小数据段，增加网络协议头开销。 Nagle 算法的目标是减少小 TCP 数]]></description><guid isPermaLink="false">/archives/r7WmXe1T</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Sat, 31 Oct 2026 18:18:04 GMT</pubDate></item><item><title><![CDATA[Netty：ByteBuf 引用计数、Handler 消息传播与处理器选型]]></title><link>https://lookstar.asia/archives/egua9yeW</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Netty%EF%BC%9AByteBuf%20%E5%BC%95%E7%94%A8%E8%AE%A1%E6%95%B0%E3%80%81Handler%20%E6%B6%88%E6%81%AF%E4%BC%A0%E6%92%AD%E4%B8%8E%E5%A4%84%E7%90%86%E5%99%A8%E9%80%89%E5%9E%8B&amp;url=/archives/egua9yeW" width="1" height="1" alt="" style="opacity:0;">一、ByteBuf 为什么需要引用计数？ 普通 Java 对象通常由 JVM 垃圾回收器管理。Netty 的 ByteBuf 可能使用池化内存或直接内存，因此通过引用计数管理资源生命周期。 ByteBuf buffer = Unpooled.buffer(); buffer.writeBytes("]]></description><guid isPermaLink="false">/archives/egua9yeW</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Sat, 31 Oct 2026 18:16:38 GMT</pubDate></item><item><title><![CDATA[Netty：EventLoop 线程隔离、业务线程池与背压控制]]></title><link>https://lookstar.asia/archives/fFWexazT</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Netty%EF%BC%9AEventLoop%20%E7%BA%BF%E7%A8%8B%E9%9A%94%E7%A6%BB%E3%80%81%E4%B8%9A%E5%8A%A1%E7%BA%BF%E7%A8%8B%E6%B1%A0%E4%B8%8E%E8%83%8C%E5%8E%8B%E6%8E%A7%E5%88%B6&amp;url=/archives/fFWexazT" width="1" height="1" alt="" style="opacity:0;">一、为什么 EventLoop 不能执行耗时任务？ Netty 使用 Reactor 线程模型处理网络事件。一个 EventLoop 通常会负责多个 Channel，并在自己的线程中处理这些 Channel 的 IO 事件和 Pipeline 事件。 例如： EventLoop-1 ├── Ch]]></description><guid isPermaLink="false">/archives/fFWexazT</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Sat, 31 Oct 2026 18:16:05 GMT</pubDate></item><item><title><![CDATA[Java NIO：compact() 的正确理解与常见问题]]></title><link>https://lookstar.asia/archives/fkJ5lEns</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Java%20NIO%EF%BC%9Acompact%28%29%20%E7%9A%84%E6%AD%A3%E7%A1%AE%E7%90%86%E8%A7%A3%E4%B8%8E%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98&amp;url=/archives/fkJ5lEns" width="1" height="1" alt="" style="opacity:0;">一、compact() 是什么？ compact() 的作用是：保留 Buffer 中尚未读取的数据，将它们移动到缓冲区开头，并将 position 设置为剩余数据的长度，以便继续写入新数据。 它主要解决一个问题： 当 Buffer 中的数据没有处理完，又需要接收新数据时，如何保留之前未处理的数据？]]></description><guid isPermaLink="false">/archives/fkJ5lEns</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Sat, 31 Oct 2026 18:11:28 GMT</pubDate></item><item><title><![CDATA[Netty：LengthFieldBasedFrameDecoder 五个参数与 lengthAdjustment 计算原理]]></title><link>https://lookstar.asia/archives/TCCMIrun</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Netty%EF%BC%9ALengthFieldBasedFrameDecoder%20%E4%BA%94%E4%B8%AA%E5%8F%82%E6%95%B0%E4%B8%8E%20lengthAdjustment%20%E8%AE%A1%E7%AE%97%E5%8E%9F%E7%90%86&amp;url=/archives/TCCMIrun" width="1" height="1" alt="" style="opacity:0;">一、先理解长度字段的三个概念 使用 LengthFieldBasedFrameDecoder 时，最容易混淆的是：长度字段本身占多少字节，以及长度字段里面存储的数值是多少。 例如协议： [Magic 2字节][BodyLength 2字节][Body 10字节]]]></description><guid isPermaLink="false">/archives/TCCMIrun</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Sat, 31 Oct 2026 17:53:00 GMT</pubDate></item><item><title><![CDATA[Netty：Channel 生命周期、连接管理与 ChannelGroup 使用]]></title><link>https://lookstar.asia/archives/GsqFRSy8</link><description><![CDATA[<img src="https://lookstar.asia/plugins/feed/assets/telemetry.gif?title=Netty%EF%BC%9AChannel%20%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E3%80%81%E8%BF%9E%E6%8E%A5%E7%AE%A1%E7%90%86%E4%B8%8E%20ChannelGroup%20%E4%BD%BF%E7%94%A8&amp;url=/archives/GsqFRSy8" width="1" height="1" alt="" style="opacity:0;">一、Channel 生命周期与状态 Channel 从注册、连接到关闭，会经历一系列生命周期事件。正常建立连接后再关闭，典型顺序如下： channelRegistered() ↓ channelActive() ↓ channelRead() / channelRea]]></description><guid isPermaLink="false">/archives/GsqFRSy8</guid><dc:creator>Administrator</dc:creator><category>技术</category><pubDate>Sat, 31 Oct 2026 17:03:00 GMT</pubDate></item></channel></rss>