com.netflix.curator.utils
Class DefaultZookeeperFactory

java.lang.Object
  extended by com.netflix.curator.utils.DefaultZookeeperFactory
All Implemented Interfaces:
ZookeeperFactory

public class DefaultZookeeperFactory
extends java.lang.Object
implements ZookeeperFactory


Constructor Summary
DefaultZookeeperFactory()
           
 
Method Summary
 org.apache.zookeeper.ZooKeeper newZooKeeper(java.lang.String connectString, int sessionTimeout, org.apache.zookeeper.Watcher watcher, boolean canBeReadOnly)
          Allocate a new ZooKeeper instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultZookeeperFactory

public DefaultZookeeperFactory()
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.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.ZooKeeper(String, int, Watcher, long, byte[], boolean) for details
Returns:
the instance
Throws:
java.lang.Exception - errors