public ConfigurationStorage(DocumentDatabase db, ServerStore serverStore) { var options = db.Configuration.Core.RunInMemory ? StorageEnvironmentOptions.CreateMemoryOnly(Path.Combine(db.Configuration.Core.DataDirectory, "Configuration")) : StorageEnvironmentOptions.ForPath(Path.Combine(db.Configuration.Core.DataDirectory, "Configuration")); options.SchemaVersion = 1; Environment = new StorageEnvironment(options); AlertsStorage = new AlertsStorage(db.Name, serverStore); IndexesEtagsStorage = new IndexesEtagsStorage(db.Name); }
public void Initialize(IndexStore indexStore, TransformerStore transformerStore) { _contextPool = new TransactionContextPool(Environment); AlertsStorage.Initialize(Environment, _contextPool); IndexesEtagsStorage.Initialize(Environment, _contextPool, indexStore, transformerStore); }