@Component
public class ZkUtils
extends java.lang.Object
implements org.springframework.context.ApplicationContextAware
| 构造器和说明 |
|---|
ZkUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ZkUtils |
getInstance() |
ZkConfig |
getZkConfig() |
org.apache.zookeeper.ZooKeeper |
getZooKeeper() |
org.apache.zookeeper.ZooKeeper |
getZooKeeper(org.apache.zookeeper.Watcher watcher) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setZkConfig(ZkConfig zkConfig) |
public static ZkUtils getInstance()
public org.apache.zookeeper.ZooKeeper getZooKeeper()
throws java.io.IOException
java.io.IOExceptionpublic org.apache.zookeeper.ZooKeeper getZooKeeper(org.apache.zookeeper.Watcher watcher)
throws java.io.IOException
java.io.IOExceptionpublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic ZkConfig getZkConfig()
public void setZkConfig(ZkConfig zkConfig)
Copyright © 2019. All Rights Reserved.