Class DefaultZookeeperFactory

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

public class DefaultZookeeperFactory extends Object implements ZookeeperFactory
  • 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 interface ZookeeperFactory
      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
      Returns:
      the instance
      Throws:
      Exception - errors