Exemplo n.º 1
0
        public ZooKeeperRegistery(ZooKeeperClient zkClient)
        {
            _zkListeners = new ConcurrentDictionary <string, ConcurrentDictionary <INotifyListener, ChildListener> >();

            _zkStateListener = new StateListener();
            _zkStateListener.OnReconnected += this.Recover;

            _zkClient = zkClient;
            _zkClient.EnsurePath(ROOT_PATH);
            _zkClient.SubscribeStateListener(_zkStateListener);
        }