use of com.ms.silverking.cloud.dht.collection.IntArrayCuckoo in project SilverKing by Morgan-Stanley.
the class IntRehashTest method rehashTest.
public static void rehashTest(int size) {
IntArrayCuckoo map;
map = new IntArrayCuckoo(new WritableCuckooConfig(totalEntries, numSubTables, entriesPerBucket, cuckooLimit));
for (int i = 0; i < size; i++) {
try {
map.put(new SimpleKey(0, i), i);
} catch (TableFullException tfe) {
System.out.println("rehashing");
map = IntArrayCuckoo.rehashAndAdd(map, new SimpleKey(0, i), i);
}
}
}
Aggregations