Beispiel #1
0
        private Tree(LowLevelTransaction llt, Transaction tx, long root, PageLocator pageLocator = null)
        {
            _llt = llt;
            _tx  = tx;
            _recentlyFoundPages = new RecentlyFoundTreePages(llt.Flags == TransactionFlags.Read ? 8 : 2);
            _isPageLocatorOwned = pageLocator == null;
            _pageLocator        = pageLocator ?? llt.PersistentContext.AllocatePageLocator(llt);

            _state = new TreeMutableState(llt)
            {
                RootPageNumber = root
            };
        }
Beispiel #2
0
        private Tree(LowLevelTransaction llt, Transaction tx, long root, Slice name, bool isIndexTree, NewPageAllocator newPageAllocator)
        {
            _llt        = llt;
            _tx         = tx;
            IsIndexTree = isIndexTree;
            Name        = name;

            if (newPageAllocator != null)
            {
                SetNewPageAllocator(newPageAllocator);
            }

            _recentlyFoundPages = new RecentlyFoundTreePages(llt.Flags == TransactionFlags.Read ? 8 : 2);

            _state = new TreeMutableState(llt)
            {
                RootPageNumber = root
            };
        }