随笔分类 -  netty

摘要:入口ByteBuffer.allocateDirect public static ByteBuffer allocateDirect(int capacity) { return new DirectByteBuffer(capacity); } DirectByteBuffer构造函数 Dire 阅读全文
posted @ 2017-11-02 14:56 等风来。。 阅读(1418) 评论(0) 推荐(0) 编辑
摘要:我们常说的代理也就是只正向代理,正向代理的过程,它隐藏了真实的请求客户端,服务端不知道真实的客户端是谁,客户端请求的服务都 被代理服务器代替来请求,某些科学上网工具扮演的就是典型的正向代理角色。用浏览器访问 google.com 时,被残忍的block,于是你可 以在国外搭建一台代理服务器,让代理帮 阅读全文
posted @ 2017-11-01 18:12 等风来。。 阅读(154) 评论(0) 推荐(0) 编辑
摘要:State management 1.业务状态管理-是否登录 A ChannelHandler often needs to store some stateful information. The simplest and recommended approach is to use member 阅读全文
posted @ 2017-07-31 17:03 等风来。。 阅读(678) 评论(0) 推荐(0) 编辑
摘要:Future and Promise are the two separate sides of an asynchronous operation. promise is used by the "producer/writer" of the asynchronous operation. fu 阅读全文
posted @ 2017-07-28 18:30 等风来。。 阅读(271) 评论(0) 推荐(0) 编辑
摘要:1: Netty 4的线程模型转变 在Netty 3的时候,upstream是在IO线程里执行的,而downstream是在业务线程里执行的。比如netty从网络读取一个包传递给你的handler的时候, 你的handler部分的代码是执行在IO线程里,而你的业务线程调用write向网络写出一些东西 阅读全文
posted @ 2017-07-13 14:55 等风来。。 阅读(963) 评论(0) 推荐(0) 编辑
摘要:一、基本类原子操作 AtomicBoolean,AtomicInteger,AtomicLong,AtomicReference<V>对boolean,Integer,long,reference定义的变量进行原子性的操作, 简单点说就是它提供的方法都是原子性的,不会出现线程之间存在的问题 二、原子 阅读全文
posted @ 2017-07-12 11:45 等风来。。 阅读(2257) 评论(0) 推荐(0) 编辑
摘要:A buffer is a linear, finite sequence of elements of a specific primitive type. Aside from its content, the essential properties of a buffer are its c 阅读全文
posted @ 2014-07-21 19:58 等风来。。 阅读(279) 评论(0) 推荐(0) 编辑

------------------------------------------------------------------------------------------------------------ --------------- 欢迎联系 x.guan.ling@gmail.com--------------- ------------------------------------------------------------------------------------------------------------
点击右上角即可分享
微信分享提示