code: public static TransactionSnapshot copyFrom(long snapshotTime, long readPointer,
                                               long writePointer, Collection<Long> invalid,
                                               NavigableMap<Long, TransactionManager.InProgressTx> inProgress,
                                               Map<Long, Set<ChangeId>> committing,
                                               NavigableMap<Long, Set<ChangeId>> committed) {
      // copy invalid IDs
      Collection<Long> invalidCopy = Lists.newArrayList(invalid);
      // copy in-progress IDs and expirations
      NavigableMap<Long, TransactionManager.InProgressTx> inProgressCopy = Maps.newTreeMap(inProgress);
  
      // for committing and committed maps, we need to copy each individual Set as well to prevent modification
      Map<Long, Set<ChangeId>> committingCopy = Maps.newHashMap();
      for (Map.Entry<Long, Set<ChangeId>> entry : committing.entrySet()) {
        committingCopy.put(entry.getKey(), new HashSet<>(entry.getValue()));
      }
  
      NavigableMap<Long, Set<ChangeId>> committedCopy = new TreeMap<>();
      for (Map.Entry<Long, Set<ChangeId>> entry : committed.entrySet()) {
        committedCopy.put(entry.getKey(), new HashSet<>(entry.getValue()));
      }
  
      return new TransactionSnapshot(snapshotTime, readPointer, writePointer,
                                     invalidCopy, inProgressCopy, committingCopy, committedCopy);
    }
docs: Creates a new {@code TransactionSnapshot} instance with copies of all of the individual collections.
  @param readPointer current transaction read pointer
  @param writePointer current transaction write pointer
  @param invalid current list of invalid write pointers
  @param inProgress current map of in-progress write pointers to expiration timestamps
  @param committing current map of write pointers to change sets which have passed {@code canCommit()} but not
  yet committed
  @param committed current map of write pointers to change sets which have committed
  @return a new {@code TransactionSnapshot} instance