public _IVisitor4_27(IdSlotChanges _enclosing, FreespaceCommitter freespaceCommitter , bool forFreespace) { this._enclosing = _enclosing; this.freespaceCommitter = freespaceCommitter; this.forFreespace = forFreespace; }
public virtual void Commit(FreespaceCommitter freespaceCommitter) { IVisitable slotChangeVisitable = new _IVisitable_52(this); freespaceCommitter.TransactionalIdSystem(this); AccumulateFreeSlots(freespaceCommitter, false); GlobalIdSystem().Commit(slotChangeVisitable, freespaceCommitter); }
public virtual void AccumulateFreeSlot(TransactionalIdSystemImpl idSystem, FreespaceCommitter freespaceCommitter, bool forFreespace) { if (ForFreespace() != forFreespace) { return; } if (_firstOperation == SlotChange.SlotChangeOperation.create) { return; } if (_currentOperation == SlotChange.SlotChangeOperation.update || _currentOperation == SlotChange.SlotChangeOperation.delete) { Slot slot = ModifiedSlotInParentIdSystem(idSystem); if (Slot.IsNull(slot)) { slot = idSystem.CommittedSlot(_key); } // No old slot at all can be the case if the object // has been deleted by another transaction and we add it again. if (!Slot.IsNull(slot)) { freespaceCommitter.DelayedFree(slot, FreeToSystemFreespaceSystem()); } } }
public void Commit(IVisitable slotChanges, FreespaceCommitter freespaceCommitter) { Slot reservedSlot = _transactionLogHandler.AllocateSlot(false, CountSlotChanges(slotChanges )); freespaceCommitter.Commit(); _transactionLogHandler.ApplySlotChanges(slotChanges, CountSlotChanges(slotChanges ), reservedSlot); }
public virtual void AccumulateFreeSlots(FreespaceCommitter accumulator, bool forFreespace ) { _slotChanges.AccumulateFreeSlots(accumulator, forFreespace, IsSystemIdSystem()); if (_parentIdSystem != null) { _parentIdSystem.AccumulateFreeSlots(accumulator, forFreespace); } }
public override void Commit(IVisitable slotChanges, FreespaceCommitter freespaceCommitter ) { if (TriggersException()) { _exceptionFactory.ThrowException(); } base.Commit(slotChanges, freespaceCommitter); }
// do nothing public virtual void Commit(IVisitable slotChanges, FreespaceCommitter freespaceCommitter ) { Slot oldSlot = _slot; Slot reservedSlot = AllocateSlot(false, EstimatedSlotLength(EstimateMappingCount( slotChanges))); // No more operations against the FreespaceManager. // Time to free old slots. freespaceCommitter.Commit(); slotChanges.Accept(new _IVisitor4_69(this)); WriteThis(reservedSlot); FreeSlot(oldSlot); }
public void AccumulateFreeSlots(FreespaceCommitter freespaceCommitter, bool forFreespace , bool traverseMutable) { IVisitor4 visitor = new _IVisitor4_27(this, freespaceCommitter, forFreespace); if (traverseMutable) { _slotChanges.TraverseMutable(visitor); } else { _slotChanges.TraverseLocked(visitor); } }
public override void AccumulateFreeSlot(TransactionalIdSystemImpl idSystem, FreespaceCommitter freespaceCommitter, bool forFreespace) { if (ForFreespace() != forFreespace) { return; } base.AccumulateFreeSlot(idSystem, freespaceCommitter, forFreespace); if (_freed == null) { return; } IEnumerator iterator = _freed.GetEnumerator(); while (iterator.MoveNext()) { freespaceCommitter.DelayedFree((Slot)iterator.Current, FreeToSystemFreespaceSystem ()); } }
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(); }
public void Commit(FreespaceCommitter accumulator) { }
public void AccumulateFreeSlots(FreespaceCommitter freespaceCommitter, bool forFreespace ) { }
public override void AccumulateFreeSlot(TransactionalIdSystemImpl idSystem, FreespaceCommitter freespaceCommitter, bool forFreespace) { base.AccumulateFreeSlot(idSystem, freespaceCommitter, forFreespace); }
public virtual void CommitIds() { FreespaceCommitter freespaceCommitter = new FreespaceCommitter(_targetDb.FreespaceManager ()); freespaceCommitter.TransactionalIdSystem(SystemTrans().IdSystem()); _targetDb.IdSystem().Commit(Mapping().SlotChanges(), freespaceCommitter); freespaceCommitter.Commit(); }
public virtual void Commit(IVisitable slotChanges, FreespaceCommitter freespaceCommitter ) { _delegate.Commit(slotChanges, freespaceCommitter); }