Package org.apache.curator.utils
Interface ZookeeperFactory
-
- All Known Implementing Classes:
DefaultZookeeperFactory
public interface ZookeeperFactory
-
-
Method Summary
All Methods Instance Methods Abstract 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
org.apache.zookeeper.ZooKeeper newZooKeeper(java.lang.String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly) throws java.lang.ExceptionAllocate a new ZooKeeper instance- 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
-
-