private HostBlobStore CreateBlobStore(TemporaryHostBlobStore.Config configuration, int memoryBudget, string directoryName) { string text = Path.Combine(this.workingDirectory, directoryName); Directory.CreateDirectory(text); TemporaryHostBlobStore temporaryHostBlobStore = new TemporaryHostBlobStore(configuration, this.storeDisposalEscrow, "CobaltStore." + directoryName, (long)memoryBudget, text, false); this.blobStores.Add(temporaryHostBlobStore); return(temporaryHostBlobStore); }
private void InitializePartitionBlobStores(int memoryBudget) { TemporaryHostBlobStore.Config config = new TemporaryHostBlobStore.Config(); config.AllocateBsn = (() => (ulong)Interlocked.Increment(ref CobaltStore.bsn)); config.StartBsn = (() => (ulong)CobaltStore.bsn); this.contentBlobStore = this.CreateBlobStore(config, memoryBudget, "Content"); this.metadataBlobStore = this.CreateBlobStore(config, memoryBudget, "Metadata"); this.editorTableBlobStore = this.CreateBlobStore(config, memoryBudget, "Editors"); this.convertedDocumentBlobStore = this.CreateBlobStore(config, memoryBudget, "WWConv"); this.updateBlobStore = this.CreateBlobStore(config, memoryBudget, "WWUpdate"); }