源码分析
Ziegler Han
造轮子十年,感悟:尽量不要造轮子。
展开
-
Dubbo源码分析:DubboCodec编码和解码
DubboCodecDubboCodec是实现RPC调用的Request和Response对象的编码和解码类,RPC调用实现的核心传输也就是这两个类对象。DubboCodec的父类列表AbstractCodec (org.apache.dubbo.remoting.transport) TransportCodec (org.apache.dubbo.remoting.transport.codec) TelnetCodec (org.apache.dubbo.remoting原创 2021-03-19 15:00:18 · 565 阅读 · 1 评论 -
Dubbo RPC线程模型 源码分析
协议启动流程DubboProtocolDubboProtocol.exportDubboProtocol.openServerDubboProtocol.createServerExchangers.bind(url, requestHandler)new DubboProtocolServer(server)HeaderExchangerpublic class HeaderExchanger implements Exchanger { public s.原创 2020-12-29 18:43:32 · 291 阅读 · 0 评论 -
CountDownLatch实现的源码分析,核心基于AQS(AbstractQueuedSynchronizer)
await()调用流程:1. await countDownLatch.await();2. acquireSharedInterruptibly /** * Causes the current thread to wait until the latch has counted down to * zero, unless the thread is {@linkplain Thread#interrupt interrupted}. *原创 2020-07-15 23:55:18 · 218 阅读 · 0 评论