public CounterStorage(string serverUrl, string counterStorageStorageName, InMemoryRavenConfiguration configuration) { CounterStorageUrl = String.Format("{0}counters/{1}", serverUrl, counterStorageStorageName); CounterStorageName = counterStorageStorageName; var options = configuration.RunInMemory ? StorageEnvironmentOptions.CreateMemoryOnly() : CreateStorageOptionsFromConfiguration(configuration.CountersDataDirectory, configuration.Settings); storageEnvironment = new StorageEnvironment(options); ReplicationTask = new RavenCounterReplication(this); //TODO: add an option to create a ReplicationRequestTimeout when creating a new counter storage ReplicationTimeoutInMs = configuration.GetConfigurationValue <int>("Raven/Replication/ReplicationRequestTimeout") ?? 60 * 1000; metricsCounters = new CountersMetricsManager(); Initialize(); }
public CounterStorage(string serverUrl, string storageName, InMemoryRavenConfiguration configuration, TransportState recievedTransportState = null) { CounterStorageUrl = String.Format("{0}counters/{1}", serverUrl, storageName); Name = storageName; var options = configuration.RunInMemory ? StorageEnvironmentOptions.CreateMemoryOnly() : CreateStorageOptionsFromConfiguration(configuration.CountersDataDirectory, configuration.Settings); storageEnvironment = new StorageEnvironment(options); ReplicationTask = new RavenCounterReplication(this); //TODO: add an option to create a ReplicationRequestTimeout when creating a new counter storage ReplicationTimeoutInMs = configuration.Replication.ReplicationRequestTimeoutInMilliseconds; metricsCounters = new CountersMetricsManager(); transportState = recievedTransportState ?? new TransportState(); Initialize(); }