use of org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV2 in project infinispan by infinispan.
the class ConsistentHashPerformanceTest method testVariousVersion1.
public void testVariousVersion1() {
ConsistentHashV2 dch2 = new ConsistentHashV2();
initConsistentHash(dch2);
testConsistentHashSpeed(dch2);
}
use of org.infinispan.client.hotrod.impl.consistenthash.ConsistentHashV2 in project infinispan by infinispan.
the class ConsistentHashV2Test method setUp.
private void setUp(int numOwners) {
a1 = new InetSocketAddress(1);
a2 = new InetSocketAddress(2);
a3 = new InetSocketAddress(3);
a4 = new InetSocketAddress(4);
LinkedHashMap<SocketAddress, Set<Integer>> map = new LinkedHashMap<SocketAddress, Set<Integer>>();
map.put(a1, Collections.singleton(0));
map.put(a2, Collections.singleton(1000));
map.put(a3, Collections.singleton(2000));
map.put(a4, Collections.singleton(3000));
this.v1 = new ConsistentHashV2();
this.v1.init(map, numOwners, 10000);
hash = new DummyHash();
this.v1.setHash(hash);
}
Aggregations