Memtable implements Iterable<IndexEntry> { public void put(IndexEntry indexEntry) { writeLock.lock(); try { values.put(indexEntry.getRowKey(), indexEntry); } finally { writeLock.unlock(); } } Memtable(); void clear(); int size(); void put(IndexEntry indexEntry); IndexEntry get(Key rowKey); void delete(Key rowKey); @Override IndexEntryIterator iterator(); IndexEntryIterator iterator(Key startKey, Key endKey);  }
@Test public void testSimplePerformance() { Memtable memtable = new Memtable(); File file = new File("file"); StopWatch stopWatch = new StopWatch(); stopWatch.start(); for (int i = 0; i < 10000; ++i) { memtable.put(new IndexEntry(Key.of((long) i), file, i)); } stopWatch.stop(); System.out.println(stopWatch); assertTrue(stopWatch.getDuration().compareTo(Duration.ofSeconds(1, 100)) < 0); }