Beispiel #1
0
 /// <summary>
 /// zookeeper contructor for writelock </summary>
 /// <param name="zookeeper"> zookeeper client instance </param>
 /// <param name="dir"> the parent path you want to use for locking </param>
 /// <param name="acls"> the acls that you want to use for all the paths,
 /// if null world read/write is used. </param>
 public WriteLock(ZooKeeper zookeeper, string dir, List <ACL> acls) : base(zookeeper)
 {
     this.dir = dir;
     if (acls != null)
     {
         m_acl = acls;
     }
     zop = new LockZooKeeperOperation(this);
 }
Beispiel #2
0
		/// <summary>
		/// zookeeper contructor for writelock
		/// </summary>
		/// <param name="zookeeper"> zookeeper client instance </param>
		/// <param name="dir">       the parent path you want to use for locking </param>
		/// <param name="acls">      the acls that you want to use for all the paths,
		///                  if null world read/write is used. </param>
		public WriteLock(ZooKeeper zookeeper, string dir, IList<ACL> acl) : base(zookeeper)
		{
			this.dir = dir;
			if (acl != null)
			{
				Acl = acl;
			}
			this.zop = new LockZooKeeperOperation(this);
		}