摘要: ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务。分布式应用可以使用它来实现诸如:统一命名服务、配置管理、分布式锁服务、集群管理等功能。公司常用到的是Java服务集群的管理。1.函数介绍//create a handle to used communicate with zooke... 阅读全文
posted @ 2013-04-27 17:53 春文秋武 阅读(1432) 评论(0) 推荐(0) 编辑
摘要: boost thread库提供了三种级别的锁:boost::shared_lock(读锁),boost::upgrade_lock(和读锁不互斥,与写锁、upgrade_loc互斥),boost::unique_loc(写锁)五种互斥变量:mutex:独占式互斥量shared_mutex: 读共享/... 阅读全文
posted @ 2013-04-27 16:59 春文秋武 阅读(503) 评论(0) 推荐(0) 编辑