摘要:
1. HistoryDoug Cuttingis inspired by the the paper,MapReduce: Simplified Data Processing on Large Clusters by Jeffrey Dean and Sanjay Ghemawat from Go... 阅读全文
摘要:
虚拟化和抽象化无所不在,计算机科学里有一句老话:所有问题都可以通过增加一个间接层来解决。操作系统是对硬件的虚拟化;许多现代语言所用的虚拟机又是对操作系统的抽象;对象-关系映射层抽象了数据库;负载均衡和虚拟IP抽象了网络终端;云计算(infrastructure as service)虚拟化了Infr... 阅读全文
摘要:
如果我们在使用有一个枚举类型时,每次会用到其一项或多项(也就是enum set)时,会怎么做呢?在Java没有引入EnumSet之前,有一种叫int enum pattern(assigning a different power of 2 to each constant)的做法,例如一个字体的s... 阅读全文
摘要:
1. Why Use Nested Classes?There are several compelling reasons for using nested classes, among them:It is a way of logically grouping classes that are... 阅读全文
摘要:
By the time you write your first complete use case, you’ll realize you’re going to have more extensions than use cases. Extensions are the primary way... 阅读全文
摘要:
经常需要在Java中调用其它的脚本(shell,cmd), 以前都用:Runtime r = Runtime.getSystemRuntime();r.exec("whatever you want to run");但是有时侯其运行结果是不可预期的,带来很多麻烦。从java 5.0以后,引入了Pr... 阅读全文