public virtual void Commit(IVisitable slotChanges, FreespaceCommitter freespaceCommitter ) { _container.FreespaceManager().BeginCommit(); slotChanges.Accept(new _IVisitor4_129(this)); // TODO: Maybe we want a BTree that doesn't allow duplicates. // Then we could do the following in one step without removing first. _bTree.Commit(Transaction()); IdGeneratorValue(_idGenerator.PersistentGeneratorValue()); if (_idGenerator.IsDirty()) { _idGenerator.SetClean(); _persistentState.SetStateDirty(); } if (_persistentState.IsDirty()) { _persistentState.Write(Transaction()); } _container.FreespaceManager().EndCommit(); _transactionalIdSystem.Commit(freespaceCommitter); _transactionalIdSystem.Clear(); }