Example #1
0
 private void InitializeExisting(int persistentArrayId)
 {
     _persistentState = new PersistentIntegerArray(SlotChangeFactory.IdSystem, _transactionalIdSystem
                                                   , persistentArrayId);
     _persistentState.Read(Transaction());
     _bTree = new BTree(Transaction(), BTreeConfiguration(), BTreeId(), new BTreeIdSystem.IdSlotMappingHandler
                            ());
 }
Example #2
0
        private void InitializeExisting(int id)
        {
            _idArray = new PersistentIntegerArray(SlotChangeFactory.FreeSpace, _idSystem, id);
            _idArray.Read(Transaction());
            int[] ids       = _idArray.Array();
            int   addressId = ids[0];
            int   lengthID  = ids[1];

            CreateBTrees(addressId, lengthID);
            _slotsByAddress.Read(Transaction());
            _slotsByLength.Read(Transaction());
            _delegate.Read(_file, _file.SystemData().InMemoryFreespaceSlot());
        }
Example #3
0
        /// <exception cref="System.Exception"></exception>
        public virtual void Test()
        {
            int[] original             = new int[] { 10, 99, 77 };
            PersistentIntegerArray arr = new PersistentIntegerArray(SlotChangeFactory.IdSystem
                                                                    , null, original);

            arr.Write(SystemTrans());
            int id = arr.GetID();

            Reopen();
            arr = new PersistentIntegerArray(SlotChangeFactory.IdSystem, null, id);
            arr.Read(SystemTrans());
            int[] copy = arr.Array();
            ArrayAssert.AreEqual(original, copy);
        }
Example #4
0
 private void InitializeExisting(int persistentArrayId)
 {
     _persistentState = new PersistentIntegerArray(SlotChangeFactory.IdSystem, _transactionalIdSystem
         , persistentArrayId);
     _persistentState.Read(Transaction());
     _bTree = new BTree(Transaction(), BTreeConfiguration(), BTreeId(), new IdSlotMappingHandler
         ());
 }
Example #5
0
 private void InitializeExisting(int id)
 {
     _idArray = new PersistentIntegerArray(SlotChangeFactory.FreeSpace, _idSystem, id);
     _idArray.Read(Transaction());
     var ids = _idArray.Array();
     var addressId = ids[0];
     var lengthID = ids[1];
     CreateBTrees(addressId, lengthID);
     _slotsByAddress.Read(Transaction());
     _slotsByLength.Read(Transaction());
     _delegate.Read(_file, _file.SystemData().InMemoryFreespaceSlot());
 }