Esempio n. 1
0
 internal Create(string path, byte[] data, List <ACL> acl, CreateMode createMode)
     : base(ZooDefs.OpCode.create, path)
 {
     this.data = data;
     this.acl  = acl;
     flags     = createMode.toFlag();
 }
Esempio n. 2
0
 /// <summary>
 ///     Constructs a create operation.  Arguments are as for the ZooKeeper method of the same name.
 /// </summary>
 /// <param name="path">
 ///     the path for the node
 /// </param>
 /// <param name="data">
 ///     the initial data for the node
 /// </param>
 /// <param name="acl">
 ///     the acl for the node
 /// </param>
 /// <param name="createMode">
 ///     specifying whether the node to be created is ephemeral
 ///     and/or sequential.
 /// </param>
 public Transaction create(string path, byte[] data, List <ACL> acl, CreateMode createMode)
 {
     if (createMode == null)
     {
         throw new ArgumentNullException(nameof(createMode));
     }
     ops.Add(Op.create(path, data, acl, createMode.toFlag()));
     return(this);
 }