摘要: ConcurrentHashMap是JDK 1.5推出的类,性能上比HashTable和Collections.synchronizedMap(new HashMap())快很多。看此类源码最好和HashTable对比理解,会发现它的优化,此类一出HashTable可废。优化的方向,降低读对锁的依赖,写都是加锁。一,主要是用了分离锁1.概括结构如下,可以简单理解成把一个大的HashTable分解成多个,形成了锁分离。ConcurrentHashMap默认是分离了16个模块,即理想状态下能有16个线程同时并发(指要修改的map处于不同的模块之中)。采用分离锁可以避免无意义的等待,相比。在Hash 阅读全文
posted @ 2012-12-28 08:44 何锦彬 阅读(2550) 评论(6) 推荐(2)
摘要: 起因:故尝试调试下HashMap实现原理,打印出transient Entry<K,V>[] table 变量的变化情况一,在hashmap中加入打印调试信息hashmap的实现就是用一个Entry的对象数组Entry中存next形成链,链用于储存key有相同hashcode但key的equas不同的entry,这个网上有很多相关分析;那么我现在尝试在hashmap这个类中加入监控信息用来展示它的实现原理打开JDK的源码(基于1.6),并在HashMap类中加入新的方法用于打印调试信息,即HashMap中table对象数组变量的变化 1 public String getTable 阅读全文
posted @ 2012-12-25 17:51 何锦彬 阅读(4747) 评论(3) 推荐(2)
摘要: 1. build a environment of the test first of all . create the branch like belowD:\gitTest\Download4Http>git branch Bensonhe-dev change-branch dev master merge-branch * rebase-branchthen change something on change-branch and commit it as node “changeA” .and change it again and... 阅读全文
posted @ 2012-12-22 00:48 何锦彬 阅读(3005) 评论(0) 推荐(0)
摘要: step 1make sure you have install the JDK ,eclipse ,GITyou can find the new revision Spring project in https://github.com/SpringSource/spring-frameworkstep 2clone the project from the server by HTTP or SSH or any way that you like.examplestep 3build and import spring project to eclipse workstationbef 阅读全文
posted @ 2012-12-14 19:04 何锦彬 阅读(3502) 评论(3) 推荐(0)
摘要: package org.benson.dto;import java.util.ArrayList;import java.util.List;/** * @author BenSon He * @email qing878@gmail.com ,qq 107966750 * @since 19/21/2012 */public class Node { List<Node> list = new ArrayList<Node>();; private int value; private int level; public int getLevel() { retur 阅读全文
posted @ 2012-11-21 18:33 何锦彬 阅读(950) 评论(1) 推荐(0)
摘要: JAVA的正则表达式判断一个字符是否匹配一个模式建立一个模式:String patternRule=”var dataArray=\\[(.*)\\]\\; FRunTimeQuote.GetData\\(dataArray\\)”;//定义匹配条件Pattern p=Pattern. .compile(patternRule);获取匹配类:String content=”var dataArray=['XAGUSD', '白银美元', 32.8900, 0.68, '2.11%', '2012-09-06','32.21 阅读全文
posted @ 2012-09-07 11:52 何锦彬 阅读(2730) 评论(0) 推荐(0)
摘要: JAVA 代理实现代理的实现分动态代理和静态代理,静态代理的实现是对已经生成了的JAVA类进行封装。动态代理则是在运行时生成了相关代理累,在JAVA中生成动态代理一般有两种方式。JDK自带实现方法JDK实现代理生成,是用类 java.lang.reflect.Proxy, 实现方式如下EX:public class JDKProxy { public static Object getPoxyObject(final Object c) { return Proxy.newProxyInstance(c.getClass().getClassLoader(), c.getClass().get 阅读全文
posted @ 2012-08-30 16:42 何锦彬 阅读(26215) 评论(5) 推荐(6)
摘要: eclipse for j2ee开发版本 windows版本,32位(普通的)http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/SR2/eclipse-jee-indigo-SR2-win32.zip174 MB eclipse 3.7.2 标准版http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.7.2-201202080800/eclipse-SDK- 阅读全文
posted @ 2012-05-27 15:29 何锦彬 阅读(861) 评论(0) 推荐(0)
摘要: (1)数据库性能优化者;(2)负载均衡(3)多层缓存优化,分布式缓存(4)高并发访问控制(5)海量数据检索优化技术(6)中间件性能调优(7)网络安全相关知识 阅读全文
posted @ 2012-04-18 17:58 何锦彬 阅读(230) 评论(1) 推荐(0)
摘要: How to become a software architect?In industry specific forums, I often see questions like “what certification do I need to do to become an architect?”. The simple answer is that you don't need a certification to become an architect.It may help, but there is a lot more to it to become an archite 阅读全文
posted @ 2012-04-07 11:37 何锦彬 阅读(1557) 评论(2) 推荐(2)