@Override
	public void saveToPackedFile(File outputFile, TaskMonitor monitor)
			throws IOException, CancelledException {

		transactionMgr.checkLockingTask();

		if (!lock("saveToPackedFile")) {
			throw new IOException("Unable to lock due to active transaction");
		}
		try {

			ContentHandler<?> ch = DomainObjectAdapter.getContentHandler(this);
			PackedDatabase.packDatabase(dbh, name, ch.getContentType(), outputFile, monitor);

			// TODO :( output method will cause Redo-able transactions to be cleared
			// and may cause older Undo-able transactions to be cleared.
			// Should implement transaction listener to properly maintain domain object
			// transaction sychronization

		}
		finally {
			unlock();
		}
	}
Indicates that this domain object has been restored to a completely different state due
to a transaction undo/redo/rollback or a database merge operation.
Ghidra/Framework/Project/src/main/java/ghidra/framework/data/DomainObjectAdapterDB.java