Beispiel #1
0
        public virtual int NewId(SlotChangeFactory slotChangeFactory)
        {
            int id = AcquireId();

            _slotChanges.ProduceSlotChange(id, slotChangeFactory).NotifySlotCreated(null);
            return(id);
        }
Beispiel #2
0
 public PersistentIntegerArray(SlotChangeFactory slotChangeFactory
                               , ITransactionalIdSystem idSystem, int[] arr) : base(idSystem)
 {
     _slotChangeFactory = slotChangeFactory;
     _ints = new int[arr.Length];
     System.Array.Copy(arr, 0, _ints, 0, arr.Length);
 }
Beispiel #3
0
 public BTreeConfiguration(ITransactionalIdSystem idSystem, SlotChangeFactory slotChangeFactory
                           , int cacheSize, bool canEnlistWithTransaction)
 {
     _idSystem                 = idSystem;
     _slotChangeFactory        = slotChangeFactory;
     _canEnlistWithTransaction = canEnlistWithTransaction;
     _cacheSize                = cacheSize;
 }
        public virtual SlotChange ProduceSlotChange(int id, SlotChangeFactory slotChangeFactory
                                                    )
        {
            if (DTrace.enabled)
            {
                DTrace.ProduceSlotChange.Log(id);
            }
            SlotChange slot = slotChangeFactory.NewInstance(id);

            _slotChanges.Add(slot);
            return((SlotChange)slot.AddedOrExisting());
        }
 public virtual void NotifySlotDeleted(int id, SlotChangeFactory slotChangeFactory
                                       )
 {
     ProduceSlotChange(id, slotChangeFactory).NotifyDeleted(FreespaceManager());
 }
 internal virtual void NotifySlotUpdated(int id, Slot slot, SlotChangeFactory slotChangeFactory
                                         )
 {
     ProduceSlotChange(id, slotChangeFactory).NotifySlotUpdated(FreespaceManager(), slot
                                                                );
 }
 public virtual void NotifySlotCreated(int id, Slot slot, SlotChangeFactory slotChangeFactory
                                       )
 {
     ProduceSlotChange(id, slotChangeFactory).NotifySlotCreated(slot);
 }
Beispiel #8
0
 public void NotifySlotDeleted(int id, SlotChangeFactory slotChangeFactory)
 {
     WritePointer(id, Slot.Zero);
 }
Beispiel #9
0
 public void NotifySlotUpdated(int id, Slot slot, SlotChangeFactory slotChangeFactory
                               )
 {
     WritePointer(id, slot);
 }
Beispiel #10
0
 public int NewId(SlotChangeFactory slotChangeFactory)
 {
     return(_container.AllocatePointerSlot());
 }
Beispiel #11
0
 public virtual void NotifySlotDeleted(int id, SlotChangeFactory slotChangeFactory
                                       )
 {
     _slotChanges.NotifySlotDeleted(id, slotChangeFactory);
 }
Beispiel #12
0
 public virtual void NotifySlotUpdated(int id, Slot slot, SlotChangeFactory slotChangeFactory
                                       )
 {
     _slotChanges.NotifySlotUpdated(id, slot, slotChangeFactory);
 }
Beispiel #13
0
 public PersistentIntegerArray(SlotChangeFactory slotChangeFactory
                               , ITransactionalIdSystem idSystem, int id) : base(idSystem)
 {
     _slotChangeFactory = slotChangeFactory;
     SetID(id);
 }