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 ServerStore(RavenConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } IoMetrics = new IoMetrics(8, 8); // TODO:: increase this to 256,256 ? Configuration = configuration; _logger = LoggingSource.Instance.GetLogger <ServerStore>("ServerStore"); DatabasesLandlord = new DatabasesLandlord(this); Alerts = new AlertsStorage("Raven/Server", this); DatabaseInfoCache = new DatabaseInfoCache(); }
public void Initialize(IndexStore indexStore, TransformerStore transformerStore) { _contextPool = new TransactionContextPool(Environment); AlertsStorage.Initialize(Environment, _contextPool); IndexesEtagsStorage.Initialize(Environment, _contextPool, indexStore, transformerStore); }