public class DefaultZookeeperFactory extends Object implements ZookeeperFactory
Constructor and Description |
---|
DefaultZookeeperFactory() |
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
newZooKeeper
public org.apache.zookeeper.ZooKeeper newZooKeeper(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly) throws Exception
ZookeeperFactory
newZooKeeper
in interface ZookeeperFactory
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(String, int, Watcher, long, byte[], boolean)
for detailsException
- errorsCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.