Пример #1
0
		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());
				}
			}
		}
Пример #2
0
 public TransactionalIdSystemImpl(IClosure4 freespaceManager, IClosure4 globalIdSystem
     , TransactionalIdSystemImpl parentIdSystem)
 {
     _globalIdSystem = globalIdSystem;
     _slotChanges = new IdSlotChanges(this, freespaceManager);
     _parentIdSystem = parentIdSystem;
 }
		public TransactionalIdSystemImpl(IClosure4 freespaceManager, IClosure4 globalIdSystem
			, Db4objects.Db4o.Internal.Ids.TransactionalIdSystemImpl parentIdSystem)
		{
			_globalIdSystem = globalIdSystem;
			_slotChanges = new IdSlotChanges(this, freespaceManager);
			_parentIdSystem = parentIdSystem;
		}
Пример #4
0
 public TransactionalIdSystemImpl(IClosure4 freespaceManager, IClosure4 globalIdSystem
                                  , Db4objects.Db4o.Internal.Ids.TransactionalIdSystemImpl parentIdSystem)
 {
     _globalIdSystem = globalIdSystem;
     _slotChanges    = new IdSlotChanges(this, freespaceManager);
     _parentIdSystem = parentIdSystem;
 }
Пример #5
0
 public TransactionalIdSystemImpl(IClosure4 freespaceManager, IClosure4 globalIdSystem
                                  , TransactionalIdSystemImpl parentIdSystem)
 {
     _globalIdSystem = globalIdSystem;
     _slotChanges    = new IdSlotChanges(this, freespaceManager);
     _parentIdSystem = parentIdSystem;
 }
Пример #6
0
		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
					());
			}
		}
Пример #7
0
		protected virtual Slot ModifiedSlotInParentIdSystem(TransactionalIdSystemImpl idSystem
			)
		{
			return idSystem.ModifiedSlotInParentIdSystem(_key);
		}
Пример #8
0
 public IdSlotChanges(TransactionalIdSystemImpl idSystem, IClosure4 freespaceManager
                      )
 {
     _idSystem         = idSystem;
     _freespaceManager = freespaceManager;
 }
			public _IVisitable_52(TransactionalIdSystemImpl _enclosing)
			{
				this._enclosing = _enclosing;
			}
Пример #10
0
		public IdSlotChanges(TransactionalIdSystemImpl idSystem, IClosure4 freespaceManager
			)
		{
			_idSystem = idSystem;
			_freespaceManager = freespaceManager;
		}
		// FIXME: If we are doing a delete, we should also free our pointer here.
		protected override Slot ModifiedSlotInParentIdSystem(TransactionalIdSystemImpl idSystem
			)
		{
			return null;
		}
		public override void AccumulateFreeSlot(TransactionalIdSystemImpl idSystem, FreespaceCommitter
			 freespaceCommitter, bool forFreespace)
		{
			base.AccumulateFreeSlot(idSystem, freespaceCommitter, forFreespace);
		}
Пример #13
0
 public _IVisitable_52(TransactionalIdSystemImpl _enclosing)
 {
     this._enclosing = _enclosing;
 }