Class ConfigurableZookeeperFactory

java.lang.Object
org.apache.curator.utils.DefaultZookeeperFactory
org.apache.curator.utils.ConfigurableZookeeperFactory
All Implemented Interfaces:
ZookeeperFactory

public class ConfigurableZookeeperFactory extends DefaultZookeeperFactory
Configurable ZookeeperFactory, by using org.apache.zookeeper.client.ZKClientConfig.
  • 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 string
      sessionTimeout - session timeout in milliseconds
      watcher - optional watcher
      canBeReadOnly - 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 details
      zkClientConfig - ZooKeeper client config
      Returns:
      the instance
      Throws:
      Exception - errors