int key = rnd.nextInt(maxKey);
key /= segmentCount;
key = key * segmentCount + segmentNo;
if (rnd.nextInt(100) > read2write) {
Object obj = cache.get(new DomainObjKey(key));
cache.put(new DomainObjKey(key), obj);
WRITE_OPS.incrementAndGet();
}
else {
// synchronized(cache) {
Object obj = cache.get(new DomainObjKey(key));
// }
READ_OPS.incrementAndGet();
}
}
}