Package org.apache.curator.utils
Class DefaultZookeeperFactory
java.lang.Object
org.apache.curator.utils.DefaultZookeeperFactory
- All Implemented Interfaces:
ZookeeperFactory
- Direct Known Subclasses:
ConfigurableZookeeperFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.zookeeper.ZooKeeper
newZooKeeper
(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly) Allocate a new ZooKeeper instanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.curator.utils.ZookeeperFactory
newZooKeeper
-
Constructor Details
-
DefaultZookeeperFactory
public DefaultZookeeperFactory()
-
-
Method Details
-
newZooKeeper
public org.apache.zookeeper.ZooKeeper newZooKeeper(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly) throws Exception Description copied from interface:ZookeeperFactory
Allocate a new ZooKeeper instance- Specified by:
newZooKeeper
in interfaceZookeeperFactory
- Parameters:
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. SeeZooKeeper(String, int, Watcher, long, byte[], boolean)
for details- Returns:
- the instance
- Throws:
Exception
- errors
-