code: private void restoreSnapshot(TransactionSnapshot snapshot) {
      LOG.info("Restoring transaction state from snapshot at " + snapshot.getTimestamp());
      Preconditions.checkState(lastSnapshotTime == 0, "lastSnapshotTime has been set!");
      Preconditions.checkState(readPointer == 0, "readPointer has been set!");
      Preconditions.checkState(lastWritePointer == 0, "lastWritePointer has been set!");
      Preconditions.checkState(invalid.isEmpty(), "invalid list should be empty!");
      Preconditions.checkState(inProgress.isEmpty(), "inProgress map should be empty!");
      Preconditions.checkState(committingChangeSets.isEmpty(), "committingChangeSets should be empty!");
      Preconditions.checkState(committedChangeSets.isEmpty(), "committedChangeSets should be empty!");
      LOG.info("Restoring snapshot of state: " + snapshot);
  
      lastSnapshotTime = snapshot.getTimestamp();
      readPointer = snapshot.getReadPointer();
      lastWritePointer = snapshot.getWritePointer();
      invalid.addAll(snapshot.getInvalid());
      inProgress.putAll(txnBackwardsCompatCheck(defaultLongTimeout, longTimeoutTolerance, snapshot.getInProgress()));
      committingChangeSets.putAll(snapshot.getCommittingChangeSets());
      committedChangeSets.putAll(snapshot.getCommittedChangeSets());
    }
docs: Restore the initial in-memory transaction state from a snapshot.