public interface ZookeeperFactory
| Modifier and Type | Method and Description |
|---|---|
org.apache.zookeeper.ZooKeeper |
newZooKeeper(String connectString,
int sessionTimeout,
org.apache.zookeeper.Watcher watcher,
boolean canBeReadOnly)
Allocate a new ZooKeeper instance
|
org.apache.zookeeper.ZooKeeper newZooKeeper(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly) throws Exception
connectString - the connection stringsessionTimeout - session timeout in millisecondswatcher - optional watchercanBeReadOnly - if true, allow ZooKeeper client to enter
read only mode in case of a network partition. See
ZooKeeper.ZooKeeper(String, int, Watcher, long, byte[], boolean)
for detailsException - errorsCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.