use a Builder to create ConsistentHash<Node>
invoking add(Node, replica) for all nodes rebuild the internal Table many times. Using a builder, Table is only created (and sorted) once also avoid creating a fresh new Hash object (java 8 lambdas, I miss you)
Showing
想要评论请 注册 或 登录