Beispiel #1
0
        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);
        }
Beispiel #2
0
 public void Initialize(IndexStore indexStore, TransformerStore transformerStore)
 {
     _contextPool = new TransactionContextPool(Environment);
     AlertsStorage.Initialize(Environment, _contextPool);
     IndexesEtagsStorage.Initialize(Environment, _contextPool, indexStore, transformerStore);
 }