public RmsLicenseStoreManager(string path, int maxCount, RmsPerformanceCounters perfCounters) { ICachePerformanceCounters cachePerformanceCounters = null; if (perfCounters == null) { this.perfCounters = NoopMruDictionaryPerfCounters.Instance; } else { this.perfCounters = perfCounters.LicenseStorePerfCounters; cachePerformanceCounters = perfCounters.LicenseStorePerfCounters; } this.licenseMap = new RmsLicenseStoreInfoMap(path, maxCount, this.perfCounters); this.cache = new Cache <MultiValueKey, TenantLicensePair>(RmsClientManager.AppSettings.RacClcCacheSizeInBytes, RmsClientManager.AppSettings.RacClcCacheExpirationInterval, TimeSpan.Zero, null, cachePerformanceCounters); this.cache.OnRemoved += RmsLicenseStoreManager.CacheOnRemoved; }
public static void InitializeServerInfoMap(string serverMapPath, int maxCount, RmsPerformanceCounters performanceCounters) { ArgumentValidator.ThrowIfNullOrEmpty(serverMapPath, "serverMapPath"); RmsServerInfoManager.serverInfoMap = new ExternalRmsServerInfoMap(serverMapPath, maxCount, (RmsServerInfoManager.perfCounters == null) ? null : RmsServerInfoManager.perfCounters.ServerInfoMapPerfCounters); RmsServerInfoManager.perfCounters = performanceCounters; RmsServerInfoManager.initialized = true; }