Exemplo n.º 1
0
 /// <summary>
 /// stop
 /// </summary>
 public override void Stop()
 {
     if (this._registry != null)
     {
         this._registry.Dispose();
         this._registry = null;
     }
     base.Stop();
 }
Exemplo n.º 2
0
        /// <summary>
        /// start
        /// </summary>
        public override void Start()
        {
            base.Start();

            if (this.Config.Registry == null ||
                this.Config.Registry.Zookeeper == null ||
                string.IsNullOrEmpty(this.Config.Registry.Zookeeper.ConfigPath) ||
                string.IsNullOrEmpty(this.Config.Registry.Zookeeper.ConfigName) ||
                string.IsNullOrEmpty(this.Config.Registry.Zookeeper.ZNode))
            {
                return;
            }

            this._registry = new ZookeeperRegistry(this.Port, this.Config.ServiceType,
                                                   this.Config.Registry.Zookeeper.ConfigPath,
                                                   this.Config.Registry.Zookeeper.ConfigName,
                                                   this.Config.Registry.Zookeeper.ZNode,
                                                   this.Config.Registry.Zookeeper.Owner);
        }