Esempio n. 1
0
        public static RollingCountConfig Create(bool promotable, int minActivityThreshold, TimeSpan timeToLive, TimeSpan idleTimeToLive, bool removable, TimeSpan idleCleanupInterval, TimeSpan windowInterval, TimeSpan windowBucketSize, Func <DateTime> timeProvider)
        {
            RollingCountConfig config = new RollingCountConfig(promotable, minActivityThreshold, timeToLive, idleTimeToLive, removable, windowInterval, windowBucketSize, idleCleanupInterval, timeProvider);

            return((RollingCountConfig)CountConfig.GetCachedObject(config));
        }
        public static AbsoluteCountConfig Create(bool promotable, int minActivityThreshold, TimeSpan timeToLive, TimeSpan idleTimeToLive, bool removable, TimeSpan idleCleanupInterval, TimeSpan historyLookbackWindow, Func <DateTime> timeProvider)
        {
            AbsoluteCountConfig config = new AbsoluteCountConfig(promotable, minActivityThreshold, timeToLive, idleTimeToLive, removable, idleCleanupInterval, historyLookbackWindow, timeProvider);

            return((AbsoluteCountConfig)CountConfig.GetCachedObject(config));
        }