final AtomicLong totalTimeForOffHeap = new AtomicLong();
final AtomicLong totalTimeForMap = new AtomicLong();
final int NO_OF_ITERATIONS = 1000000;
final CountDownLatch offHeapLatch = new CountDownLatch(NO_OF_THREADS);
final CountDownLatch mapLatch = new CountDownLatch(NO_OF_THREADS);
OffHeapByteBufferStore bufferStore = new OffHeapByteBufferStore(100000, 10);
final Cache<Integer,SimpleObject> offHeapCache = CacheBuilder.offHeapCache().storage(bufferStore).build();
for (int i = 0; i < NO_OF_THREADS; i++) {
new Thread(new Runnable() {
public void run() {
long start = System.currentTimeMillis();