Package org.apache.curator.utils
Class DefaultZookeeperFactory
- java.lang.Object
-
- org.apache.curator.utils.DefaultZookeeperFactory
-
- All Implemented Interfaces:
ZookeeperFactory
public class DefaultZookeeperFactory extends java.lang.Object implements ZookeeperFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultZookeeperFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.zookeeper.ZooKeepernewZooKeeper(java.lang.String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly)Allocate a new ZooKeeper instance
-
-
-
Method Detail
-
newZooKeeper
public org.apache.zookeeper.ZooKeeper newZooKeeper(java.lang.String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly) throws java.lang.ExceptionDescription copied from interface:ZookeeperFactoryAllocate a new ZooKeeper instance- Specified by:
newZooKeeperin 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:
java.lang.Exception- errors
-
-