摘要: SpinLock实现,摘自并发编程网```package com.juc.simple;import java.util.concurrent.atomic.AtomicReference;/** * a implement of spinlock based on cas * */public ... 阅读全文
posted @ 2015-01-19 16:47 东岸往事 阅读(400) 评论(0) 推荐(0) 编辑
摘要: zookeeper心跳机制流程梳理=========Processor链Chain```protected void setupRequestProcessors() { RequestProcessor finalProcessor = new FinalRequestProcessor(t... 阅读全文
posted @ 2015-01-19 13:11 东岸往事 阅读(31561) 评论(0) 推荐(0) 编辑
摘要: 单例模式DoubleCheck 锁问题=========先贴代码```public class DoubleCheckSingleton { private static DoubleCheckSingleton instance = null; public static DoubleCh... 阅读全文
posted @ 2015-01-19 00:58 东岸往事 阅读(739) 评论(0) 推荐(0) 编辑