public AsyncBatchReadListExecutor ( AsyncCluster cluster, BatchPolicy policy, BatchListListener listener, List <BatchRead> records ) { this.listener = listener; this.records = records; // Create commands. List <BatchNode> batchNodes = BatchNode.GenerateList(cluster, policy, records); AsyncMultiCommand[] tasks = new AsyncMultiCommand[batchNodes.Count]; int count = 0; foreach (BatchNode batchNode in batchNodes) { if (!batchNode.node.hasBatchIndex) { throw new AerospikeException(ResultCode.PARAMETER_ERROR, "Requested command requires a server that supports new batch index protocol."); } tasks[count++] = new AsyncBatchReadListCommand(this, cluster, batchNode, policy, records); } // Dispatch commands to nodes. Execute(tasks, policy.maxConcurrentThreads); }
public AsyncBatchReadListExecutor ( AsyncCluster cluster, BatchPolicy policy, BatchListListener listener, List <BatchRead> records ) : base(cluster) { this.listener = listener; this.records = records; // Create commands. List <BatchNode> batchNodes = BatchNode.GenerateList(cluster, policy, records); AsyncMultiCommand[] tasks = new AsyncMultiCommand[batchNodes.Count]; int count = 0; foreach (BatchNode batchNode in batchNodes) { tasks[count++] = new AsyncBatchReadListCommand(this, cluster, batchNode, policy, records); } // Dispatch commands to nodes. Execute(tasks, 0); }
public AsyncBatchReadListExecutor( AsyncCluster cluster, BatchPolicy policy, BatchListListener listener, List<BatchRead> records ) { this.listener = listener; this.records = records; // Create commands. List<BatchNode> batchNodes = BatchNode.GenerateList(cluster, policy, records); AsyncMultiCommand[] tasks = new AsyncMultiCommand[batchNodes.Count]; int count = 0; foreach (BatchNode batchNode in batchNodes) { if (!batchNode.node.hasBatchIndex) { throw new AerospikeException(ResultCode.PARAMETER_ERROR, "Requested command requires a server that supports new batch index protocol."); } tasks[count++] = new AsyncBatchReadListCommand(this, cluster, batchNode, policy, records); } // Dispatch commands to nodes. Execute(tasks, policy.maxConcurrentThreads); }
public AsyncBatchReadListCommand(AsyncBatchReadListCommand other) : base(other) { this.batch = other.batch; this.batchPolicy = other.batchPolicy; this.records = other.records; }
public AsyncBatchReadListCommand(AsyncBatchReadListCommand other) : base(other) { this.records = other.records; }