Ejemplo n.º 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());
         }
     }
 }
Ejemplo n.º 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
                                                   ());
            }
        }
Ejemplo n.º 3
0
 protected virtual Slot ModifiedSlotInParentIdSystem(TransactionalIdSystemImpl idSystem
                                                     )
 {
     return(idSystem.ModifiedSlotInParentIdSystem(_key));
 }
Ejemplo n.º 4
0
 // FIXME: If we are doing a delete, we should also free our pointer here.
 protected override Slot ModifiedSlotInParentIdSystem(TransactionalIdSystemImpl idSystem
                                                      )
 {
     return(null);
 }
Ejemplo n.º 5
0
 public override void AccumulateFreeSlot(TransactionalIdSystemImpl idSystem, FreespaceCommitter
                                         freespaceCommitter, bool forFreespace)
 {
     base.AccumulateFreeSlot(idSystem, freespaceCommitter, forFreespace);
 }