symDiffMembers.removeAll(commonMembers);
return symDiffMembers;
}
public void test1() {
DefaultConsistentHashFactory chf = new DefaultConsistentHashFactory();
TestAddress A = new TestAddress(0, "A");
TestAddress B = new TestAddress(1, "B");
TestAddress C = new TestAddress(2, "C");
TestAddress D = new TestAddress(3, "D");
DefaultConsistentHash ch1 = chf.create(new MurmurHash3(), 2, 60, Arrays.<Address>asList(A), null);
//System.out.println(ch1);
DefaultConsistentHash ch2 = chf.updateMembers(ch1, Arrays.<Address>asList(A, B), null);
ch2 = chf.rebalance(ch2);
//System.out.println(ch2);
DefaultConsistentHash ch3 = chf.updateMembers(ch2, Arrays.<Address>asList(A, B, C), null);
ch3 = chf.rebalance(ch3);
//System.out.println(ch3);
DefaultConsistentHash ch4 = chf.updateMembers(ch3, Arrays.<Address>asList(A, B, C, D), null);
ch4 = chf.rebalance(ch4);
//System.out.println(ch4);
}