public RavenConfiguration(string resourceName, ResourceType resourceType, string customConfigPath = null) { ResourceName = resourceName; ResourceType = resourceType; _configBuilder = new ConfigurationBuilder(); AddEnvironmentVariables(); AddJsonConfigurationVariables(customConfigPath); Settings = _configBuilder.Build(); Core = new CoreConfiguration(); Http = new HttpConfiguration(); Replication = new ReplicationConfiguration(); Cluster = new ClusterConfiguration(); Etl = new EtlConfiguration(); Storage = new StorageConfiguration(); Security = new SecurityConfiguration(); PerformanceHints = new PerformanceHintsConfiguration(); Indexing = new IndexingConfiguration(this); Monitoring = new MonitoringConfiguration(); Queries = new QueryConfiguration(); Patching = new PatchingConfiguration(); Logs = new LogsConfiguration(); Server = new ServerConfiguration(); Testing = new TestingConfiguration(); Databases = new DatabaseConfiguration(); Memory = new MemoryConfiguration(); Studio = new StudioConfiguration(); Licensing = new LicenseConfiguration(); Tombstones = new TombstoneConfiguration(); Subscriptions = new SubscriptionConfiguration(); }
public RavenConfiguration() { _configBuilder = new ConfigurationBuilder(); AddEnvironmentVariables(_configBuilder); AddJsonConfigurationVariables(); Settings = _configBuilder.Build(); Core = new CoreConfiguration(); Replication = new ReplicationConfiguration(); SqlReplication = new SqlReplicationConfiguration(); Storage = new StorageConfiguration(); Encryption = new EncryptionConfiguration(); Indexing = new IndexingConfiguration(() => DatabaseName, () => Core.RunInMemory, () => Core.DataDirectory); WebSockets = new WebSocketsConfiguration(); Monitoring = new MonitoringConfiguration(); Queries = new QueryConfiguration(); Patching = new PatchingConfiguration(); DebugLog = new DebugLoggingConfiguration(); BulkInsert = new BulkInsertConfiguration(); Server = new ServerConfiguration(); Memory = new MemoryConfiguration(this); Expiration = new ExpirationBundleConfiguration(); Studio = new StudioConfiguration(); Databases = new DatabaseConfiguration(); Licensing = new LicenseConfiguration(); Quotas = new QuotasBundleConfiguration(); Tombstones = new TombstoneConfiguration(); }
public StronglyTypedRavenSettings(NameValueCollection settings) { Replication = new ReplicationConfiguration(); SqlReplication = new SqlReplicationConfiguration(); Voron = new VoronConfiguration(); Esent = new EsentConfiguration(); Prefetcher = new PrefetcherConfiguration(); FileSystem = new FileSystemConfiguration(); Encryption = new EncryptionConfiguration(); Indexing = new IndexingConfiguration(); WebSockets = new WebSocketsConfiguration(); Studio = new StudioConfiguration(); this.settings = settings; }
private RavenConfiguration(string resourceName, ResourceType resourceType, string customConfigPath = null, bool skipEnvironmentVariables = false) { _logger = LoggingSource.Instance.GetLogger <RavenConfiguration>(resourceName); ResourceName = resourceName; ResourceType = resourceType; _customConfigPath = customConfigPath; PathSettingBase <string> .ValidatePath(_customConfigPath); _configBuilder = new ConfigurationBuilder(); if (skipEnvironmentVariables == false) { AddEnvironmentVariables(); } AddJsonConfigurationVariables(customConfigPath); Settings = _configBuilder.Build(); Core = new CoreConfiguration(); Http = new HttpConfiguration(); Replication = new ReplicationConfiguration(); Cluster = new ClusterConfiguration(); Etl = new EtlConfiguration(); Storage = new StorageConfiguration(); Security = new SecurityConfiguration(); Backup = new BackupConfiguration(); PerformanceHints = new PerformanceHintsConfiguration(); Indexing = new IndexingConfiguration(this); Monitoring = new MonitoringConfiguration(); Queries = new QueryConfiguration(); Patching = new PatchingConfiguration(); Logs = new LogsConfiguration(); Server = new ServerConfiguration(); Embedded = new EmbeddedConfiguration(); Databases = new DatabaseConfiguration(Storage.ForceUsing32BitsPager); Memory = new MemoryConfiguration(); Studio = new StudioConfiguration(); Licensing = new LicenseConfiguration(); Tombstones = new TombstoneConfiguration(); Subscriptions = new SubscriptionsConfiguration(); TransactionMergerConfiguration = new TransactionMergerConfiguration(Storage.ForceUsing32BitsPager); Notifications = new NotificationsConfiguration(); Updates = new UpdatesConfiguration(); Migration = new MigrationConfiguration(); Integrations = new IntegrationsConfiguration(); }
public StronglyTypedRavenSettings(NameValueCollection settings) { Replication = new ReplicationConfiguration(); Voron = new VoronConfiguration(); Esent = new EsentConfiguration(); Prefetcher = new PrefetcherConfiguration(); FileSystem = new FileSystemConfiguration(); Counter = new CounterConfiguration(); TimeSeries = new TimeSeriesConfiguration(); Encryption = new EncryptionConfiguration(); Indexing = new IndexingConfiguration(); WebSockets = new WebSocketsConfiguration(); Cluster = new ClusterConfiguration(); Monitoring = new MonitoringConfiguration(); Studio = new StudioConfiguration(); this.settings = settings; }
public RavenConfiguration() { Settings = new NameValueCollection(StringComparer.OrdinalIgnoreCase); Core = new CoreConfiguration(this); FileSystem = new FileSystemConfiguration(Core); Counter = new CounterConfiguration(Core); TimeSeries = new TimeSeriesConfiguration(Core); Replication = new ReplicationConfiguration(); Prefetcher = new PrefetcherConfiguration(); Storage = new StorageConfiguration(); Encryption = new EncryptionConfiguration(); Indexing = new IndexingConfiguration(); WebSockets = new WebSocketsConfiguration(); Cluster = new ClusterConfiguration(); Monitoring = new MonitoringConfiguration(); Queries = new QueryConfiguration(); Patching = new PatchingConfiguration(); BulkInsert = new BulkInsertConfiguration(); Server = new ServerConfiguration(); Memory = new MemoryConfiguration(); Expiration = new ExpirationBundleConfiguration(); Versioning = new VersioningBundleConfiguration(); Studio = new StudioConfiguration(); Tenants = new TenantConfiguration(); Licensing = new LicenseConfiguration(); Quotas = new QuotasBundleConfiguration(); IndexingClassifier = new DefaultIndexingClassifier(); Catalog = new AggregateCatalog(CurrentAssemblyCatalog); Catalog.Changed += (sender, args) => ResetContainer(); }
public void CanSetStudioConfiguration() { DoNotReuseServer(); using (var store = GetDocumentStore()) { ServerWideStudioConfiguration serverWideStudioConfiguration = store.Maintenance.Server.Send(new GetServerWideStudioConfigurationOperation()); Assert.Null(serverWideStudioConfiguration); StudioConfiguration studioConfiguration = store.Maintenance.Send(new GetStudioConfigurationOperation()); Assert.Null(studioConfiguration); store.Maintenance.Server.Send(new PutServerWideStudioConfigurationOperation(new ServerWideStudioConfiguration { Environment = StudioConfiguration.StudioEnvironment.Development, ReplicationFactor = 2 })); serverWideStudioConfiguration = store.Maintenance.Server.Send(new GetServerWideStudioConfigurationOperation()); Assert.NotNull(serverWideStudioConfiguration); Assert.Equal(StudioConfiguration.StudioEnvironment.Development, serverWideStudioConfiguration.Environment); // from server Assert.Equal(2, serverWideStudioConfiguration.ReplicationFactor); studioConfiguration = store.Maintenance.Send(new GetStudioConfigurationOperation()); Assert.Null(studioConfiguration); store.Maintenance.Send(new PutStudioConfigurationOperation(new StudioConfiguration { Environment = StudioConfiguration.StudioEnvironment.Production })); studioConfiguration = store.Maintenance.Send(new GetStudioConfigurationOperation()); Assert.NotNull(studioConfiguration); Assert.Equal(StudioConfiguration.StudioEnvironment.Production, studioConfiguration.Environment); // from database store.Maintenance.Server.Send(new PutServerWideStudioConfigurationOperation(new ServerWideStudioConfiguration { Environment = StudioConfiguration.StudioEnvironment.None })); studioConfiguration = store.Maintenance.Send(new GetStudioConfigurationOperation()); Assert.NotNull(studioConfiguration); Assert.Equal(StudioConfiguration.StudioEnvironment.Production, studioConfiguration.Environment); // from database store.Maintenance.Send(new PutStudioConfigurationOperation(new StudioConfiguration { Environment = StudioConfiguration.StudioEnvironment.Production, Disabled = true })); studioConfiguration = store.Maintenance.Send(new GetStudioConfigurationOperation()); Assert.NotNull(studioConfiguration); Assert.True(studioConfiguration.Disabled); Assert.Equal(StudioConfiguration.StudioEnvironment.Production, studioConfiguration.Environment); // from database } }
public PutStudioConfigurationCommand(DocumentConventions conventions, JsonOperationContext context, StudioConfiguration configuration) { if (conventions == null) { throw new ArgumentNullException(nameof(conventions)); } if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (context == null) { throw new ArgumentNullException(nameof(context)); } _configuration = DocumentConventions.Default.Serialization.DefaultConverter.ToBlittable(configuration, context); }
public PutStudioConfigurationOperation(StudioConfiguration configuration) { _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); }
public PutStudioConfigurationCommand(DocumentConventions conventions, JsonOperationContext context, StudioConfiguration configuration) { if (conventions == null) { throw new ArgumentNullException(nameof(conventions)); } if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (context == null) { throw new ArgumentNullException(nameof(context)); } _configuration = EntityToBlittable.ConvertCommandToBlittable(configuration, context); }