Esempio n. 1
0
        static CacheManager()
        {
            CacheManager.innerCacheQueues = new Dictionary <Type, CacheQueueBase>();
            CacheManager.totalCounters    = new CachingPerformanceCounters("_Total_");

            //后台清理线程,定期清理整个应用域中每一个CacheQueue中的每一个Cache项
            //此线程在系统启动时自动启动,不受客户端代码控制
            InitScavengingThread();
        }
Esempio n. 2
0
        /// <summary>
        /// 初始化性能监视指针
        /// </summary>
        /// <param name="instanceName">本地性能监视器的指针</param>
        protected void InitPerformanceCounters(string instanceName)
        {
            if (this.totalCounters == null)
            {
                this.totalCounters = new CachingPerformanceCounters("_Total_");
            }

            if (this.counters == null)
            {
                instanceName.CheckStringIsNullOrEmpty("instanceName");
                this.counters = new CachingPerformanceCounters(instanceName);
            }
        }
Esempio n. 3
0
		/// <summary>
		/// 初始化性能监视指针
		/// </summary>
		/// <param name="instanceName">本地性能监视器的指针</param>
		protected void InitPerformanceCounters(string instanceName)
		{
			if (this.totalCounters == null)
				this.totalCounters = new CachingPerformanceCounters("_Total_");

			if (this.counters == null)
			{
				instanceName.CheckStringIsNullOrEmpty("instanceName");
				this.counters = new CachingPerformanceCounters(instanceName);
			}
		}