Example #1
0
        public void jlkjkfzk()
        {
            try
            {
                var client = new ZooKeeperClient("lib_zookeeper");

                client.Set("/qpl", "fasdfasd");

                var data = client.Get <string>("/qpl");

                client.Dispose();
            }
            catch (Exception e)
            {
                //
            }
        }
Example #2
0
        private async Task ClientThread(CancellationToken token)
        {
            var created = new List <string>();

            while (!token.IsCancellationRequested)
            {
                var result = await client.CreateAsync(new CreateRequest(path, CreateMode.PersistentSequential));

                if (result.IsSuccessful)
                {
                    created.Add(result.NewPath);
                }

                await SleepRandom();
            }

            client.Dispose();

            Log.Info("Created thread nodes: " + string.Join(", ", created.OrderBy(x => x)));
        }
 public new void OneTimeTearDown()
 {
     client.Dispose();
 }
 public void TearDown()
 {
     client.Dispose();
 }
Example #5
0
 public void Dispose()
 {
     _client.Dispose();
 }