Chan Chen Coding...

11 2012 档案

BLOBs and CLOBs
     摘要: solidDB® can store binary and character data up to 2147483647 (2G - 1) bytes long. When such data exceeds a certain length, the data is called a BLOB (Binary Large OBject) or CLOB (Character Large OBject), depending upon the data type that stores the information. CLOBS contain only "plain text" and can be stored in any of the following data types:  阅读全文

posted @ 2012-11-30 13:44 Chan Chen 阅读(313) | 评论 (0)  编辑

Understand The SerialVersionUID
     摘要: The serialVersionUID is used as a version control in a Serializable class. If you do not explicitly declare a serialVersionUID, JVM will do it for you automatically, based on various aspects of your Serializable class, as described in the Java(TM) Object Serialization Specification.  阅读全文

posted @ 2012-11-28 12:01 Chan Chen 阅读(372) | 评论 (0)  编辑

Netty 4.0 源码分析(八):Netty 4.0中的io.netty.buffer包
     摘要: Netty 4.0的源码结构与之前的3.X版本发生了较大的变化,以下是Netty 4.0源码的层次结构
在接下来的源码分析中,笔者打算对每个包实现的功能做详细的分析(除了example包,all包和tarball包)。在这篇文章中,笔者将对buffer包进行分析。  阅读全文

posted @ 2012-11-27 11:34 Chan Chen 阅读(13474) | 评论 (2)  编辑

Runnable Callable Future and Executor in Java
     摘要: Executor就是Runnable和Callable的调度容器,Future就是对于具体的调度任务的执行结果进行查看,最为关键的是Future可以检查对应的任务是否已经完成,也可以阻塞在get方法上一直等待任务返回结果。Runnable和Callable的差别就是Runnable是没有结果可以返回的,就算是通过Future也看不到任务调度的结果的。   阅读全文

posted @ 2012-11-26 11:59 Chan Chen 阅读(341) | 评论 (0)  编辑

Netty 4.0 源码分析(七):AbstractBootstrap抽象类
     摘要: AbstractBootstrap是一个帮助类,通过方法链(method chaining)的方式,提供了一个简单易用的方式来配置Bootstrap,然后启动一个Channel。在理解Netty源码中的AbstractBootstrap, ServerBootstrap和Bootstrap之前,应该先了解一下什么是method chaining。  阅读全文

posted @ 2012-11-26 10:57 Chan Chen 阅读(2166) | 评论 (0)  编辑

Netty 4.0 源码分析(六):EventLoop和EventLoopGroup
     摘要: EventLoop相当于一个Thread线程,而EventLoopGroup则是管理这些EventLoop的Thread线程池  阅读全文

posted @ 2012-11-25 21:49 Chan Chen 阅读(4490) | 评论 (0)  编辑

Netty 4.0 源码分析(四):ByteBuf
     摘要: Netty是基于流的消息传递机制。Netty框架中,所有消息的传输都依赖于ByteBuf接口,ByteBuf是Netty NIO框架中的缓冲区。ByteBuf接口可以理解为一般的Byte数组,不过Netty对Byte进行了封装,增加了一些实用的方法。  阅读全文

posted @ 2012-11-25 20:44 Chan Chen 阅读(9193) | 评论 (0)  编辑

Netty 4.0 源码分析(五):ChannelHandlerContext和ChannelHandler
     摘要: ChannelHandlerContext接口的几个重要方法
ChannelPipeline pipeline();
返回属于当前ChannelHandlerContext的ChannelPipeline。  阅读全文

posted @ 2012-11-25 16:51 Chan Chen 阅读(12621) | 评论 (4)  编辑

Netty 4.0 源码分析(三):Channel和ChannelPipeline
     摘要: Client和server通过Channel连接,然后通过ByteBuf进行传输。每个Channel有自己的Pipeline,Pipeline上面可以添加和定义Handler和Event。  阅读全文

posted @ 2012-11-25 14:53 Chan Chen 阅读(9128) | 评论 (0)  编辑

Netty 4.0 源码分析(二):Echo Server
     摘要: Netty项目中,自带了很多使用的例子,对于刚刚开始接触和学习Netty源码的开发者来说,可以通过例子来更好的理解Netty的具体实现。源码可以再netty 4.0的example找到。  阅读全文

posted @ 2012-11-24 12:38 Chan Chen 阅读(7055) | 评论 (1)  编辑

Java中的getName(), .class 和forName()的区别

posted @ 2012-11-23 23:09 Chan Chen 阅读(784) | 评论 (0)  编辑

Question Mark ? in Java

posted @ 2012-11-23 15:47 Chan Chen 阅读(250) | 评论 (0)  编辑

Understand TheadLocal

posted @ 2012-11-23 11:24 Chan Chen 阅读(597) | 评论 (0)  编辑

Netty 4.0 源码分析(一):配置环境

posted @ 2012-11-22 21:21 Chan Chen 阅读(3240) | 评论 (0)  编辑

Import Github Source Code into Eclipse

posted @ 2012-11-21 17:18 Chan Chen 阅读(1092) | 评论 (0)  编辑

μJavaActors

posted @ 2012-11-20 15:33 Chan Chen 阅读(372) | 评论 (0)  编辑

对象的串行化(Serialization)

posted @ 2012-11-13 11:04 Chan Chen 阅读(146) | 评论 (0)  编辑

Twelve: Iterator Design Pattern

posted @ 2012-11-06 10:49 Chan Chen 阅读(252) | 评论 (0)  编辑

Eleven: Memento Design Pattern

posted @ 2012-11-06 09:45 Chan Chen 阅读(179) | 评论 (0)  编辑

Ten: Mediator Design Pattern

posted @ 2012-11-05 11:45 Chan Chen 阅读(223) | 评论 (0)  编辑

Nine: Interpreter Design Pattern

posted @ 2012-11-05 10:34 Chan Chen 阅读(240) | 评论 (0)  编辑

notify() and wait()

posted @ 2012-11-03 11:18 Chan Chen 阅读(186) | 评论 (0)  编辑

hashcode() and equal()

posted @ 2012-11-03 11:00 Chan Chen 阅读(272) | 评论 (0)  编辑

Spring依赖注入的三种方式

posted @ 2012-11-03 09:12 Chan Chen 阅读(5225) | 评论 (0)  编辑

Eight: State Design Pattern

posted @ 2012-11-02 14:56 Chan Chen 阅读(299) | 评论 (0)  编辑

Seven: Visitor Design Pattern

posted @ 2012-11-02 14:16 Chan Chen 阅读(267) | 评论 (0)  编辑

Six: Composite pattern

posted @ 2012-11-01 17:10 Chan Chen 阅读(352) | 评论 (0)  编辑

Five: Bridge Design Pattern

posted @ 2012-11-01 16:00 Chan Chen 阅读(222) | 评论 (0)  编辑