示例#1
0
 public AsyncOperate(AsyncOperate other)
     : base(other)
 {
     this.writePolicy = other.writePolicy;
     this.operations  = other.operations;
     this.args        = other.args;
 }
 /// <summary>
 /// Asynchronously perform multiple read/write operations on a single key in one batch call.
 /// Schedule the operate command with a channel selector and return.
 /// Another thread will process the command and send the results to the listener.
 /// <para>
 /// An example would be to add an integer value to an existing record and then
 /// read the result, all in one database call.
 /// </para>
 /// </summary>
 /// <param name="policy">write configuration parameters, pass in null for defaults</param>
 /// <param name="listener">where to send results, pass in null for fire and forget</param>
 /// <param name="key">unique record identifier</param>
 /// <param name="operations">database operations to perform</param>
 /// <exception cref="AerospikeException">if queue is full</exception>
 public void Operate(WritePolicy policy, RecordListener listener, Key key, params Operation[] operations)
 {
     if (policy == null)
     {
         policy = writePolicyDefault;
     }
     AsyncOperate async = new AsyncOperate(cluster, policy, listener, key, operations);
     async.Execute();
 }
 public AsyncOperate(AsyncOperate other)
     : base(other)
 {
     this.args = other.args;
 }