首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

记录上。concurrentMap的使用代码

2012-10-17 
记录下。。concurrentMap的使用代码private static final ConcurrentHashMap delegatorCache new Concurre

记录下。。concurrentMap的使用代码

private static final ConcurrentHashMap delegatorCache = new ConcurrentHashMap();do {            Object delegator = delegatorCache.get(delegatorName);            if (delegator != null) {                                return delegator;            }            try {                delegator = new Object();            } catch (ClassNotFoundException e) {                Debug.logError(e, module);            }            //Debug.logInfo("putting delegator(" + delegatorName + ") into cache", module);            delegatorCache.putIfAbsent(delegatorName, delegator);        } while (true);

热点排行