예제 #1
0
        /// <summary>
        /// Close query.
        /// </summary>
        public void Close()
        {
            valid = false;

            // Check if more records are available.
            if (record != END)
            {
                if (queue.TryTake(out record) && record != END)
                {
                    // Some query threads may still be running. Stop these threads.
                    executor.StopThreads(new AerospikeException.QueryTerminated());
                }
            }
        }
예제 #2
0
 public void Run(object obj)
 {
     try
     {
         if (command.IsValid())
         {
             command.Execute(parent.cluster, parent.policy, null, node, true);
         }
         parent.ThreadCompleted();
     }
     catch (Exception e)
     {
         // Terminate other query threads.
         parent.StopThreads(e);
     }
 }
예제 #3
0
 public void Run(object obj)
 {
     try
     {
         if (command.IsValid())
         {
             command.ExecuteAndValidate();
         }
         parent.ThreadCompleted();
     }
     catch (Exception e)
     {
         // Terminate other query threads.
         parent.StopThreads(e);
     }
 }