`
corleonelu
  • 浏览: 9527 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表
3.1 可见性     sychronized关键字的作用有两个:1是原子性 2是可见性。后者常常被忽视     NoVisibility程序演示没有同步的的共享变量。 3.1.1 失效数据 3.1.2 非原子的64位操作:存在于非volatile或没有加锁控制的long和double 3.1.3 加锁的与可见性 3.1.4 volatile          数据为共享,不会被缓存在寄存器和其他对对于处理器不可见的地方,每个线程不会有数据的本地拷贝。        volatile的用法:        http://www.ibm.com/developerworks/cn/java/j-j ...
package concurrentstudy; import java.io.IOException; import java.util.*; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; ...
      public int hashCode() { int h = hash; if (h == 0) { int off = offset; char val[] = value; int len = count; for (int i = 0; i < len; i++) { h = 31*h + val[off++]; } hash = h; } return h; ...

一致性哈希

http://article.yeeyan.org/view/119809/124126 http://ptsolmyr.com/2010/07/30/consistent_hash_by_tom_white/       我最近一段时间在研究 consistent hash。介绍它的paper(Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web byDavid Karger et al) 十年前就出现了,不过 ...
Global site tag (gtag.js) - Google Analytics