예제 #1
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);
 }
예제 #2
0
 public BTreeConfiguration(ITransactionalIdSystem idSystem, SlotChangeFactory slotChangeFactory
     , int cacheSize, bool canEnlistWithTransaction)
 {
     _idSystem = idSystem;
     _slotChangeFactory = slotChangeFactory;
     _canEnlistWithTransaction = canEnlistWithTransaction;
     _cacheSize = cacheSize;
 }
예제 #3
0
 public virtual SlotChange ProduceSlotChange(int id, SlotChangeFactory slotChangeFactory
     )
 {
     if (DTrace.enabled)
     {
         DTrace.ProduceSlotChange.Log(id);
     }
     var slot = slotChangeFactory.NewInstance(id);
     _slotChanges.Add(slot);
     return (SlotChange) slot.AddedOrExisting();
 }
예제 #4
0
		public void NotifySlotDeleted(int id, SlotChangeFactory slotChangeFactory)
		{
			WritePointer(id, Slot.Zero);
		}
예제 #5
0
		public void NotifySlotUpdated(int id, Slot slot, SlotChangeFactory slotChangeFactory
			)
		{
			WritePointer(id, slot);
		}
예제 #6
0
		public int NewId(SlotChangeFactory slotChangeFactory)
		{
			return _container.AllocatePointerSlot();
		}
		public virtual void NotifySlotDeleted(int id, SlotChangeFactory slotChangeFactory
			)
		{
			_slotChanges.NotifySlotDeleted(id, slotChangeFactory);
		}
		public virtual int NewId(SlotChangeFactory slotChangeFactory)
		{
			int id = AcquireId();
			_slotChanges.ProduceSlotChange(id, slotChangeFactory).NotifySlotCreated(null);
			return id;
		}
		public virtual void NotifySlotUpdated(int id, Slot slot, SlotChangeFactory slotChangeFactory
			)
		{
			_slotChanges.NotifySlotUpdated(id, slot, slotChangeFactory);
		}
예제 #10
0
		public virtual void NotifySlotDeleted(int id, SlotChangeFactory slotChangeFactory
			)
		{
			ProduceSlotChange(id, slotChangeFactory).NotifyDeleted(FreespaceManager());
		}
예제 #11
0
		internal virtual void NotifySlotUpdated(int id, Slot slot, SlotChangeFactory slotChangeFactory
			)
		{
			ProduceSlotChange(id, slotChangeFactory).NotifySlotUpdated(FreespaceManager(), slot
				);
		}
예제 #12
0
		public virtual void NotifySlotCreated(int id, Slot slot, SlotChangeFactory slotChangeFactory
			)
		{
			ProduceSlotChange(id, slotChangeFactory).NotifySlotCreated(slot);
		}
예제 #13
0
 public PersistentIntegerArray(SlotChangeFactory slotChangeFactory
     , ITransactionalIdSystem idSystem, int id) : base(idSystem)
 {
     _slotChangeFactory = slotChangeFactory;
     SetID(id);
 }