Пример #1
0
 public MemcachedServerPool(IOperationFactory opFactory)
 {
     if (configuration == null) {
         throw new ArgumentNullException("NoConfig");
     }
     this.configuration = ConfigurationProvider.Instance.CurConfig;
     this.opFactory = opFactory;
     //this.deadTimeoutMsec = (long)this.configuration.SocketPool.DeadTimeout.TotalMilliseconds;
 }
 /// <summary>
 /// 配置变更结束
 /// </summary>
 public void Configuration_Changed()
 {
     this.oldConfiguration = null;
     this.IsChanging = false;
 }
        /// <summary>
        /// 注册节点
        /// </summary>
        /// <param name="configuration"></param>
        public void RegisterConfiguration(MemcachedConfiguration configuration)
        {
            if (configuration == null) {
                throw new Exception();
            }
            this.curConfiguration = new MemcachedConfig(configuration);
            this.oldConfiguration = null;

            this.IsChanging = false;
        }
        /// <summary>
        /// 开始配置变更
        /// </summary>
        /// <param name="newConfiguration"></param>
        public void Configuration_Changing(MemcachedConfiguration newConfiguration)
        {
            if (newConfiguration == null) {
                throw new Exception();
            }
            this.oldConfiguration = this.curConfiguration;
            this.curConfiguration = new MemcachedConfig(newConfiguration);

            this.IsChanging = true;
        }
Пример #5
0
 public MemcachedConfigValidate(MemcachedConfig config, MemcachedConfiguration sourceConfig)
 {
     this.config = config;
     this.sourceConfig = sourceConfig;
 }