예제 #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 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
					());
			}
		}