Package org.apache.curator.utils
Class ConfigurableZookeeperFactory
java.lang.Object
org.apache.curator.utils.DefaultZookeeperFactory
org.apache.curator.utils.ConfigurableZookeeperFactory
- All Implemented Interfaces:
ZookeeperFactory
Configurable ZookeeperFactory, by using org.apache.zookeeper.client.ZKClientConfig.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.zookeeper.ZooKeeper
newZooKeeper
(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly, org.apache.zookeeper.client.ZKClientConfig zkClientConfig) Allocate a new ZooKeeper instanceMethods inherited from class org.apache.curator.utils.DefaultZookeeperFactory
newZooKeeper
-
Constructor Details
-
ConfigurableZookeeperFactory
public ConfigurableZookeeperFactory()
-
-
Method Details
-
newZooKeeper
public org.apache.zookeeper.ZooKeeper newZooKeeper(String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly, org.apache.zookeeper.client.ZKClientConfig zkClientConfig) throws Exception Description copied from interface:ZookeeperFactory
Allocate 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 detailszkClientConfig
- ZooKeeper client config- Returns:
- the instance
- Throws:
Exception
- errors
-