synchronized List<Long> put(List<TableEntry> entries) { validateKeys(entries, TableEntry::getKey); return entries .stream() .map(e -> { long version = this.nextVersion.incrementAndGet(); val key = new HashedArray(e.getKey().getKey().getCopy()); this.entries.put(key, TableEntry.versioned(key, new ByteArraySegment(e.getValue().getCopy()), version)); return version; }) .collect(Collectors.toList()); }