internal virtual void CreateEmptyIndex <KEY>(TemporalIndexFiles.FileLayout <KEY> fileLayout) where KEY : NativeIndexSingleValueKey <KEY> { IndexPopulator populator = new TemporalIndexPopulator.PartPopulator <>(PageCache, Fs, fileLayout, Monitor, Descriptor); populator.Create(); populator.Close(true); }
internal virtual PartAccessor <KEY> CreatePartAccessor <KEY>(TemporalIndexFiles.FileLayout <KEY> fileLayout) where KEY : NativeIndexSingleValueKey <KEY> { if (!Fs.fileExists(fileLayout.IndexFile)) { CreateEmptyIndex(fileLayout); } return(new PartAccessor <KEY>(PageCache, Fs, fileLayout, RecoveryCleanupWorkCollector, Monitor, Descriptor, ReadOnly)); }
internal PartPopulator(PageCache pageCache, FileSystemAbstraction fs, TemporalIndexFiles.FileLayout <KEY> fileLayout, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor) : base(pageCache, fs, fileLayout.IndexFile, fileLayout.Layout, monitor, descriptor, NO_HEADER_WRITER) { }
internal PartAccessor(PageCache pageCache, FileSystemAbstraction fs, TemporalIndexFiles.FileLayout <KEY> fileLayout, RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, bool readOnly) : base(pageCache, fs, fileLayout.IndexFile, fileLayout.Layout, monitor, descriptor, NO_HEADER_WRITER, readOnly) { this.Layout = fileLayout.Layout; this.Descriptor = descriptor; instantiateTree(recoveryCleanupWorkCollector, headerWriter); }