List of usage examples for org.apache.zookeeper ZooKeeper ZooKeeper
public ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd, boolean canBeReadOnly) throws IOException
From source file:com.ebay.jetstream.messaging.transport.zookeeper.ZooKeeperFactory.java
License:MIT License
@Override public ZooKeeper newZooKeeper(String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly) throws Exception { if (sessionId != null && sessionPwd.length > 0) { return new ZooKeeper(connectString, sessionTimeout, watcher, sessionId, sessionPwd, canBeReadOnly); } else {//from w ww.j av a 2s . co m return new ZooKeeper(connectString, sessionTimeout, watcher, canBeReadOnly); } }