<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[chenchangqun11的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/chenchangqun11</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; chenchangqun11]]></copyright><item><title><![CDATA[dubbo序列化源码分析3-MessagePack协议]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/103636734</link><guid>https://blog.csdn.net/chenchangqun11/article/details/103636734</guid><author>chenchangqun11</author><pubDate>Fri, 14 Aug 2020 21:25:23 +0800</pubDate><description><![CDATA[JSON格式：{"age":23,"cache":{"test2":"qunge2","test1":"qunge1","test3":"qunge3"},"dataList":["tiancai1","tiancai2","tiancai3"],"id":11,"name":"changqun"}

messagepack格式： :��changqun��tiancai1�tiancai2�ti...]]></description><category></category></item><item><title><![CDATA[dubbo序列化源码分析2-深入JDK，hessian序列化]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/108013797</link><guid>https://blog.csdn.net/chenchangqun11/article/details/108013797</guid><author>chenchangqun11</author><pubDate>Fri, 14 Aug 2020 21:21:39 +0800</pubDate><description><![CDATA[JDK序列化

实现Serializable接口

被序列化的Object中的 Object属性必须实现 Serializable接口，否则报异常， 基本类型默认可以序列化。static 和transient关键字修饰的变量不会被实例化



父类A没有实现Serializable 接口，子类B实现了Serializable 接口， A a=new B() 此时a可以序列化

A a=new A() 此时 a不可以序列化，也就是 被序列化的是指向的是实现了 Serializable 接口的实例才可以。

.]]></description><category></category></item><item><title><![CDATA[dubbo序列化源码分析1-序列化接口设计]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/108013112</link><guid>https://blog.csdn.net/chenchangqun11/article/details/108013112</guid><author>chenchangqun11</author><pubDate>Fri, 14 Aug 2020 20:34:31 +0800</pubDate><description><![CDATA[分析 dubbo 序列化实现
选中几个协议分析 源码 必选FastJson, jdk hessian2, msgpack 
主流 序列化协议性能对比



先找个简单的分析FastJsonSerialization

dubbo FastJson序列化

public class FastJsonSerialization implements Serialization {

  @Override
  public byte getContentTypeId() { //获取协议ID
...]]></description><category></category></item><item><title><![CDATA[dubbo序列化源码分析0-jdk,hessian序列化性能测试]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/108013074</link><guid>https://blog.csdn.net/chenchangqun11/article/details/108013074</guid><author>chenchangqun11</author><pubDate>Fri, 14 Aug 2020 20:28:11 +0800</pubDate><description><![CDATA[序列化长度对比

数据内容：{"cache":{"test2":"qunge2","test1":"qunge1","test3":"qunge3"},"dataList":["tiancai1","tiancai2","tiancai3"],"id":256,"name":"hessian"}


jdk serialize result length = 387
hessian1 serialize result length = 194
hessian2 serialize result lengt.]]></description><category></category></item><item><title><![CDATA[dubbo源码分析12-server代理创建和执行bind]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/108012764</link><guid>https://blog.csdn.net/chenchangqun11/article/details/108012764</guid><author>chenchangqun11</author><pubDate>Fri, 14 Aug 2020 20:14:48 +0800</pubDate><description><![CDATA[之前 分析 consumer代理创建和发送请求的时候，进行了简单的分层，实际上并不准确， 本文将根据 dubbo开发文档中的分层进行分析，下面列出

整体设计



图例说明：

图中左边淡蓝背景的为服务消费方使用的接口，右边淡绿色背景的为服务提供方使用的接口，位于中轴线上的为双方都用到的接口。
图中从下至上分为十层，各层均为单向依赖，右边的黑色箭头代表层之间的依赖关系，每一层都可以剥离上层被复用，其中，Service 和 Config 层为 API，其它各层均为 SPI。
图中绿色小块的为扩展接口，蓝色小]]></description><category></category></item><item><title><![CDATA[dubbo源码分析10-zookeeper注册中心]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/108012690</link><guid>https://blog.csdn.net/chenchangqun11/article/details/108012690</guid><author>chenchangqun11</author><pubDate>Fri, 14 Aug 2020 20:02:35 +0800</pubDate><description><![CDATA[zookeeper注册中心 中比较重要的内容 父子类继承， 失败重试机制， 注册和订阅实现。下面逐个分析。

父子类分析



RegistryService：定义了注册,取消注册，订阅，取消订阅方法
Registry：未定义方法
AbstractRegistry：配置持久化功能。调用listenner。
FailbackRegistry: subscribe,notify模板类， 提供 容错，独立线程失败重试，校验。

ZookeeperRegistry：具体的注册订阅实现，依赖 Zookeeper...]]></description><category></category></item><item><title><![CDATA[dubbo源码分析9-心跳机制]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/108012656</link><guid>https://blog.csdn.net/chenchangqun11/article/details/108012656</guid><author>chenchangqun11</author><pubDate>Fri, 14 Aug 2020 19:57:20 +0800</pubDate><description><![CDATA[服务端心跳机制分析

启动心跳检测 
public HeaderExchangeServer(Server server) {
    if (server == null) {
      throw new IllegalArgumentException("server == null");
    }
    this.server = server;
    this.heartbeat = server.getUrl().getParameter(...]]></description><category></category></item><item><title><![CDATA[dubbo源码分析8-动态代理原理]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/108012498</link><guid>https://blog.csdn.net/chenchangqun11/article/details/108012498</guid><author>chenchangqun11</author><pubDate>Fri, 14 Aug 2020 19:53:02 +0800</pubDate><description><![CDATA[javassist动态代理分析

dubbo Javassist创建代理方法

JavassistProxyFactory(AbstractProxyFactory).getProxy(Invoker&lt;T&gt;)

public &lt;T&gt; T getProxy(Invoker&lt;T&gt; invoker) throws RpcException {

Class&lt;?&gt;[] interfaces = null;

String config = invoker.getUrl]]></description><category></category></item><item><title><![CDATA[netty源码分析2-3-server启动-动态分析]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/107767607</link><guid>https://blog.csdn.net/chenchangqun11/article/details/107767607</guid><author>chenchangqun11</author><pubDate>Mon, 03 Aug 2020 16:40:52 +0800</pubDate><description><![CDATA[分享内容如下

client请求连接后，sever端的处理
	网络标识位的变化
	子Reactor启动
1.client请求连接后，sever端的处理









client连接时创建NioSocketChannel，触发DefaultChannelPipeline.read()

AbstractNioMessageChannel$NioMessageUnsafe.read()

@Override

public void read() {

for (;;) {

//创建

int l...]]></description><category></category></item><item><title><![CDATA[redis5.0源码浅析5-跳跃表skiplist]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/106907337</link><guid>https://blog.csdn.net/chenchangqun11/article/details/106907337</guid><author>chenchangqun11</author><pubDate>Mon, 22 Jun 2020 18:11:51 +0800</pubDate><description><![CDATA[1.skiplist介绍

定义：跳跃表是一个有序链表，其中每个节点包含不定数量的链接，节点中的第i个链接构成的单向链表跳过含有少于i个链接的节点。
	跳跃表支持平均O(logN)，最坏O(N)复杂度的节点查找，大部分情况下，跳跃表的效率可以和平衡树相媲美。
	跳跃表在redis中当数据较多时作为有序集合键的实现方式之一。
接下来，还是举个有序集合键的例子：有序集合键详解

127.0.0.1:6379&gt; ZADD score 95.5 Mike 98 Li 96 Wang //socre是一个有序集]]></description><category></category></item><item><title><![CDATA[JUC源码分析-容器-ConcurrentHashMap]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/104905189</link><guid>https://blog.csdn.net/chenchangqun11/article/details/104905189</guid><author>chenchangqun11</author><pubDate>Mon, 16 Mar 2020 18:33:35 +0800</pubDate><description><![CDATA[概述

HashMap是线程不安全的map, ConcurrentHashMap 是线程安全的map，并能适应高并发的场景。

核心属性和数据结构

final int segmentMask;

final int segmentShift;

key生成的hash值 位移segmentShift 并与上segmentMask 就是 这个key的Segment在segments数组中的索引位置。...]]></description><category></category></item><item><title><![CDATA[JUC源码分析-容器-ConcurrentSkipListMap和ConcurrentSkipListSet]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/104896103</link><guid>https://blog.csdn.net/chenchangqun11/article/details/104896103</guid><author>chenchangqun11</author><pubDate>Mon, 16 Mar 2020 12:09:53 +0800</pubDate><description><![CDATA[概述

ConcurrentSkipListMap：线程安全的有序Map，TreeMap是线程不安全的有序Map. 数据使用表单项链表存储，它借助一种跳表（Skip Lisy）的数据结构，可简单理解为 附加的索引，后面有详细分析。

ConcurrentSkipListSet:借助ConcurrentSkipListMap 实现的线程安全的有序Set，它们俩的关系就像 TreeMap 和TreeS...]]></description><category></category></item><item><title><![CDATA[JUC源码分析-容器-ConcurrentLinkedQueue]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/104074748</link><guid>https://blog.csdn.net/chenchangqun11/article/details/104074748</guid><author>chenchangqun11</author><pubDate>Wed, 11 Mar 2020 20:40:28 +0800</pubDate><description><![CDATA[ConcurrentLinkedQueue 是单向链表结构的无界并发队列。从JDK1.7开始加入到J.U.C的行列中。使用CAS实现并发安全，元素操作按照 FIFO (first-in-first-out 先入先出) 的顺序。适合“单生产，多消费”的场景。

内存一致性遵循对ConcurrentLinkedQueue的插入操作先行发生于(happen-before)访问或移除操作。、？？

...]]></description><category></category></item><item><title><![CDATA[JUC源码分析-容器-SynchronousQueue]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/104074846</link><guid>https://blog.csdn.net/chenchangqun11/article/details/104074846</guid><author>chenchangqun11</author><pubDate>Sat, 07 Mar 2020 19:08:42 +0800</pubDate><description><![CDATA[SynchronousQueue



无界队列， TransferStack从head 前面插入节点,TransferQueue从tail后写入节点

公平和非公平只是 FIFO 和LIFO的区别？



源码中实现了一种队列结构的算法

队列中有两个角色 传递者和接受者， 传递者之间排队，接受者之间排队，默认第一个入队的节点是接受者，后面入队的节点的模式与这个节点相同的为接受者，不同的为传...]]></description><category></category></item><item><title><![CDATA[JUC源码分析-辅助类-Phaser]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/104627437</link><guid>https://blog.csdn.net/chenchangqun11/article/details/104627437</guid><author>chenchangqun11</author><pubDate>Tue, 03 Mar 2020 10:50:58 +0800</pubDate><description><![CDATA[概述

Phaser 是一个同步辅助类，与CyclicBarrier和CountDownLatch功能相似，用于栅栏条件的相互等待，支持更丰富的用法， 可以将一个的程序的等待分为多个阶段。

主状态分为 4部分，1~15位 未到达者数，16~31位参与数 parties，32~62 阶段值 phase 63位 结束标识， 64位正负标识

private volatile long state;
...]]></description><category></category></item><item><title><![CDATA[JUC源码分析-辅助类-CountDownLatch,Semaphore,CyclicBarrier,Exchanger]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/104614263</link><guid>https://blog.csdn.net/chenchangqun11/article/details/104614263</guid><author>chenchangqun11</author><pubDate>Mon, 02 Mar 2020 16:39:42 +0800</pubDate><description><![CDATA[本文分析并发辅助类 CountDownLatch,Semaphore,CyclicBarrier,Exchanger

CountDownLatch

同步辅助类 实现一个线程 等待其他1~N个线程执行完成，再继续执行其他代码。

构造方法

跟踪构造方法 依赖一个 内部类，这个内部类Sync 继承了AbstractQueuedSynchronizer

public CountDownLatch...]]></description><category></category></item><item><title><![CDATA[JUC源码分析-Reetrantlock-Condition]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/103990153</link><guid>https://blog.csdn.net/chenchangqun11/article/details/103990153</guid><author>chenchangqun11</author><pubDate>Sun, 01 Mar 2020 15:38:35 +0800</pubDate><description><![CDATA[Condition是Reerantlock 实现了 wait- notify 模式的类

synchronized锁 wait- notify 模式 实现的 是 Object.wait(),Object.notify()。

so 重入锁 Reerantlock 也要有wait- notify 模式 的实现,他就是 Condition

Condition在ArrayBlockingQueue和 ...]]></description><category></category></item><item><title><![CDATA[JUC源码分析-ScheduledThreadPoolExecutor]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/104497756</link><guid>https://blog.csdn.net/chenchangqun11/article/details/104497756</guid><author>chenchangqun11</author><pubDate>Tue, 25 Feb 2020 15:13:48 +0800</pubDate><description><![CDATA[概述

ScheduledThreadPoolExecutor 预定任务线程池，用于执行延迟和周期性任务。





核心属性和数据结构

//是否应该废弃周期任务 当关闭时

private volatile boolean continueExistingPeriodicTasksAfterShutdown;

//是否应该取消非周期任务 当关闭时

private volatile bo...]]></description><category></category></item><item><title><![CDATA[JUC源码分析-容器-PriorityBlockingQueue]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/104497507</link><guid>https://blog.csdn.net/chenchangqun11/article/details/104497507</guid><author>chenchangqun11</author><pubDate>Tue, 25 Feb 2020 15:00:41 +0800</pubDate><description><![CDATA[概述

PriorityBlockingQueue:二叉堆结构优先级阻塞队列，FIFO，通过显式的lock锁保证线程安全，是一个线程安全的BlockingQueue,加入队列的数据实例按照指定优先级升序排列，这个规则通过赋值 实现了Comparator的字段或数据实例类实现Comparable接口自定义，都定义的情况下 字段比较器优先。它一个老牌的队列，在JDK1.5已经加入，如果队列加入的数据实...]]></description><category></category></item><item><title><![CDATA[JUC源码分析-读写锁-ReentrantReadWriteLock]]></title><link>https://blog.csdn.net/chenchangqun11/article/details/104456532</link><guid>https://blog.csdn.net/chenchangqun11/article/details/104456532</guid><author>chenchangqun11</author><pubDate>Tue, 25 Feb 2020 14:47:41 +0800</pubDate><description><![CDATA[概述

ReentrantReadWriteLock 有2个锁，读锁和写锁。读读不加锁，读写，写读，写写都加锁。

读锁是共享锁，写锁是排他锁。 读锁和写锁的状态值被保存在int的值中，前16位表示 共享读锁状态值，后16位表示排他写锁状态值。

数据结构和核心参数

分析一下有关的属性

static final int SHARED_SHIFT = 16;//共享锁占据16位

static ...]]></description><category></category></item></channel></rss>