public View replaceFlushed(Memtable flushedMemtable, SSTableReader newSSTable)
{
Set<Memtable> newPending = ImmutableSet.copyOf(Sets.difference(memtablesPendingFlush, Collections.singleton(flushedMemtable)));
List<SSTableReader> newSSTables = newSSTables(newSSTable);
IntervalTree intervalTree = buildIntervalTree(newSSTables);
return new View(memtable, newPending, Collections.unmodifiableList(newSSTables), compacting, intervalTree);
}