zk的基础知识基本分为三大模块 数据模型 ACL 权限控制 Watch 监控 数据模型 默认配置文件 # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a re…
多台服务器和客户端通过第三方组件Zookeeper管理 public class DistributedServer { private static final String connectString = "mini1:2181,mini2:2181,mini3:2181"; private static final int sessionTimeout = 2000; private static final String parentNode = "/servers&…