public MetadataManager(IPageManager pageAllocator, HeapWithOffsets <char[]> stringHeap, IBootPageAllocator bootPageAllocator, ILogManager logManager) { this.pageAllocator = pageAllocator; this.stringHeap = stringHeap; this.logManager = logManager; if (!bootPageAllocator.BootPageInitialized()) { using (ITransaction tran = this.logManager.CreateTransaction(this.pageAllocator, false, "GET_BOOT_PAGE")) using (Releaser releaser = tran.AcquireLock(IBootPageAllocator.BootPageId, LockManager.LockTypeEnum.Exclusive).Result) { bootPageAllocator.AllocatePageBootPage(PageType.MixedPage, this.masterPageColumnDefinition, tran); this.masterMetadataCollection = new PageListCollection(this.pageAllocator, this.masterPageColumnDefinition, IBootPageAllocator.BootPageId); tran.Commit(); } MetadataInitialSetup(); } else { using (ITransaction tran = this.logManager.CreateTransaction(this.pageAllocator, false, "GET_BOOT_PAGE")) { using Releaser releaser = tran.AcquireLock(IBootPageAllocator.BootPageId, LockManager.LockTypeEnum.Exclusive).Result; this.masterMetadataCollection = new PageListCollection(this.pageAllocator, this.masterPageColumnDefinition, IBootPageAllocator.BootPageId); tran.Commit(); } } }
public MetadataColumnsManager(IAllocateMixedPage pageAllocator, MixedPage firstPage, HeapWithOffsets <char[]> stringHeap) { if (pageAllocator == null || firstPage == null) { throw new ArgumentNullException(); } this.pageListCollection = new PageListCollection(pageAllocator, columnDefinitions, firstPage.PageId()); this.stringHeap = stringHeap; }
public MetadataTablesManager(IAllocateMixedPage pageAllocator, MixedPage firstPage, HeapWithOffsets <char[]> stringHeap, IMetadataObjectManager <MetadataColumn, ColumnCreateDefinition, Tuple <int, int> > columnManager) { if (pageAllocator == null || firstPage == null || columnManager == null) { throw new ArgumentNullException(); } this.pageListCollection = new PageListCollection(pageAllocator, columnDefinitions, firstPage.PageId()); this.stringHeap = stringHeap; this.columnManager = columnManager; this.pageAllocator = pageAllocator; }