コード例 #1
0
        public virtual void TestUseZKServiceForBinding()
        {
            CuratorService cs2 = new CuratorService("curator", zookeeper);

            cs2.Init(new Configuration());
            cs2.Start();
        }
コード例 #2
0
 /// <summary>Create an instance</summary>
 /// <exception cref="System.IO.IOException"/>
 protected internal virtual void CreateCuratorService()
 {
     curatorService = new CuratorService("curatorService");
     curatorService.Init(CreateRegistryConfiguration());
     curatorService.Start();
     rootACL = RegistrySecurity.WorldReadWriteACL;
     curatorService.MaybeCreate(string.Empty, CreateMode.Persistent, rootACL, true);
 }
コード例 #3
0
        /// <summary>Start a curator service instance</summary>
        /// <param name="name">name</param>
        /// <param name="secure">flag to indicate the cluster is secure</param>
        /// <returns>an inited and started curator service</returns>
        protected internal virtual CuratorService StartCuratorServiceInstance(string name
                                                                              , bool secure)
        {
            Configuration clientConf = new Configuration();

            clientConf.Set(KeyRegistryZkRoot, "/");
            clientConf.SetBoolean(KeyRegistrySecure, secure);
            Describe(Log, "Starting Curator service");
            CuratorService curatorService = new CuratorService(name, secureZK);

            curatorService.Init(clientConf);
            curatorService.Start();
            Log.Info("Curator Binding {}", curatorService.BindingDiagnosticDetails());
            return(curatorService);
        }