Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientConnection"/> class.
 /// </summary>
 /// <param name="connectionString">The connection string.</param>
 /// <param name="sessionTimeout">The session timeout.</param>
 /// <param name="zooKeeper">The zoo keeper.</param>
 /// <param name="watcher">The watch manager.</param>
 /// <param name="connectTimeout">Connection Timeout.</param>
 public ClientConnection(string connectionString, TimeSpan sessionTimeout, ZooKeeper zooKeeper, ZKWatchManager watcher, TimeSpan connectTimeout) :
     this(connectionString, sessionTimeout, zooKeeper, watcher, 0, new byte[16], connectTimeout)
 {
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientConnection"/> class.
 /// </summary>
 /// <param name="hosts">The hosts.</param>
 /// <param name="sessionTimeout">The session timeout.</param>
 /// <param name="zooKeeper">The zoo keeper.</param>
 /// <param name="watcher">The watch manager.</param>
 /// <param name="sessionId">The session id.</param>
 /// <param name="sessionPasswd">The session passwd.</param>
 public ClientConnection(string hosts, TimeSpan sessionTimeout, ZooKeeper zooKeeper, ZKWatchManager watcher, long sessionId, byte[] sessionPasswd)
     : this(hosts, sessionTimeout, zooKeeper, watcher, 0, new byte[16], DefaultConnectTimeout)
 {
 }
Esempio n. 3
0
        /**
         * Make sure all the nodes in the path are created. NOTE: Unlike File.mkdirs(), Zookeeper doesn't distinguish
         * between directories and files. So, every node in the path is created. The data for each node is an empty blob
         *
         * @param zookeeper the client
         * @param path      path to ensure
         * @throws InterruptedException thread interruption
         * @throws org.apache.zookeeper.KeeperException
         *                              Zookeeper errors
         */

        public static void Mkdirs(ZooKeeper zookeeper, String path)
        {
            Mkdirs(zookeeper, path, true);
        }