6.nuget安装C#Driver驱动ZooKeeperNet

IWatcher接口的实现
public class ZookeeperWatcher : IWatcher
{
public static CountdownEvent countdownEvent = new CountdownEvent();
public void Process(WatchedEvent @event)
{
Console.WriteLine("path={0},state={1},type={2}", @event.Path, @event.State, @event.Type);
countdownEvent.Signal();
}
}
log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config"));
private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
ZooKeeperNet.ZooKeeper zookeeper = new ZooKeeperNet.ZooKeeper("192.168.1.120:2181/datamip",
TimeSpan.FromSeconds(),
new ZookeeperWatcher());
//通过wait函数,等待ZookeeperWatcher 回调函数执行成功
ZookeeperWatcher.countdownEvent.Wait();
var list = zookeeper.GetChildren("/", false);
6.nuget安装C#Driver驱动ZooKeeperNet的更多相关文章
- 通过NuGet安装和配置ODP.NET(Oracle Data Provider for .NET)
前言 本文涉及ODP.NET.ODP.NET的托管(managed)驱动.Entity Framework的托管驱动 这三部分的下载.安装.配置. 1.简介 NuGet 是.NET的软件开发包管理工具 ...
- CentOS6.5菜鸟之旅:安装ATI显卡驱动
一.前言 自从安装了CentOS,我的显卡就没消停过,一直在彪高温而且噪音特别大,于是决定上网搜索解决办法.下面记录下来以供日后查阅. 二.安装fglrx driver(ATI/AMD 显卡的linu ...
- Linux编译安装RTL8192CU芯片驱动,使用TP_LINK wn823n无线网卡
前几天给自己的台式电脑安装了Window 7+CentOS 6.4 Linux双系统,发现在Windows 7下面可以正常使用TP_LINK wn823n无线网卡来连接无线网络,但是在Linux下面, ...
- Ubuntu下安装nvidia显卡驱动
layout: post title: Ubuntu下安装nvidia显卡驱动 date: 2015-10-02 17:19:06 categories: 常用命令 tags: 显卡 驱动 最近一直在 ...
- AHCI模式安装XP以及驱动下载
一.准备AHCI驱动 1.关于AHCI基础知识,请参考<AHCI模式的驱动下载.安装及蓝屏问题综合>一文. 2.安装AHCI驱动之前,请先确认桌面上.系统盘没有重要的东西需要备份,因为如果 ...
- Thinkpad W520 + Ubuntu 12.04LTS, 13.10, 14.04LTS安装Nvidia显卡驱动设置
Thinkpad W520 + Ubuntu 12.04LTS, 13.10, 14.04LTS安装Nvidia显卡驱动设置 http://henzhai.com/tech/2012/07/w520- ...
- Ubuntu中安装NVIDIA显卡驱动
1.参考: https://blog.csdn.net/xunan003/article/details/81665835 https://www.cnblogs.com/luofeel/p/8654 ...
- 在Ubuntu上安装Chrome Driver和Firefox Driver
在Ubuntu上安装Chrome Driver和Firefox Driver 此文章只介绍Chrome Driver(Firefox Driver和该步骤相同) 下载链接:http://chromed ...
- Ubuntu16.04安装NVIDIA显卡驱动
1.下载官方驱动程序 http://www.geforce.cn/drivers 如果我们直接安装驱动的话,往往会报错:ERROR: The Nouveau kernel driver is curr ...
随机推荐
- hadoop-2.7.1:Error: Cannot find configuration directory: /etc/hadoop
本文转载自:http://blog.csdn.net/huangshanchun/article/details/49533433 安装hadoop参考:http://blog.csdn.net/hi ...
- 【转】httpservlet 文章
HttpServlet类 ellisonDon 2012-10-25 12:42 阅读:2015 评论:0 HttpServlet的功能 ellisonDon 2012-10-25 11:02 ...
- 使用PHP自带zlib函数 几行代码实现PHP文件打包下载zip
<?php //获取文件列表 function list_dir($dir){ $result = array(); if (is_dir($dir)){ $file_dir = scandir ...
- 第11课 Qt中的字符串类
1. 历史遗留问题和解决方案 (1)历史遗留问题 ①C语言不支持真正意义上的字符串 ②C语言用字符数组和一组函数实现字符串操作 ③C语言不支持自定义类型,因此无法获得字符串类型 (2)解决方案 ①从C ...
- 20165233 实验一 Java开发环境的熟悉
20165233 实验一 Java开发环境的熟悉 实验要求 1.没有Linux基础的同学建议先学习<Linux基础入门(新版)><Vim编辑器> 课程: 2.完成实验.撰写实验 ...
- react之引用echarts
react之引用echarts npm: npm install echarts --save 代码: import React, { Component } from 'react'; // 引入 ...
- Linux Tomcat8 访问管理页面 403 Access Denied
http://blog.csdn.net/u012167045/article/details/61624226 1:修改conf/tomcat-users.xml配置文件 2:vi /usr/loc ...
- IBM X3650 M4 主板故障
故障描述: 今天突然接到报警,一台服务器无法连通,无法登录.无法 ping 通. 打电话到 IDC ,授权工程师查看服务器状态,返回结果如下: 1.服务器关机状态 2.无法开机 ( 电源灯亮 ),按开 ...
- MD5 几种方法的选择
转:http://zoroeye.iteye.com/blog/2026984?utm_source=tuicool&utm_medium=referral md5加密实现方法有很多种,也导致 ...
- 数据库 alert.log 日志中出现 "[Oracle][ODBC SQL Server Wire Protocol driver][SQL Server] 'RECOVER'"报错信息
现象描述: (1).数据库通过调用透明网络实现分布式事务,但透明网关停用后,失败的分布式事务并未清理. (2).数据库 alert 日志 Thu Sep 06 06:53:00 2018 Errors ...