ZookeeperFactorypublic class DefaultZookeeperFactory extends java.lang.Object implements ZookeeperFactory
| Constructor | Description |
|---|---|
DefaultZookeeperFactory() |
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.zookeeper.ZooKeeper |
newZooKeeper(java.lang.String connectString,
int sessionTimeout,
org.apache.zookeeper.Watcher watcher,
boolean canBeReadOnly) |
Allocate a new ZooKeeper instance
|
public org.apache.zookeeper.ZooKeeper newZooKeeper(java.lang.String connectString,
int sessionTimeout,
org.apache.zookeeper.Watcher watcher,
boolean canBeReadOnly)
throws java.lang.Exception
ZookeeperFactorynewZooKeeper in interface ZookeeperFactoryconnectString - 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 detailsjava.lang.Exception - errorsCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.