MCPcopy Create free account
hub / github.com/acl-dev/acl / run

Method run

lib_acl_cpp/src/redis/redis_command.cpp:397–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397const redis_result* redis_command::run(size_t nchild /* = 0 */,
398 int* timeout /* = NULL */)
399{
400 if (pipeline_ != NULL) {
401 assert(pipe_msg_); // build_request() must have been called first.
402 pipe_msg_->set_option(nchild, timeout);
403 pipe_msg_->set(dbuf_);
404 result_ = pipeline_->exec(pipe_msg_);
405 return result_;
406 }
407 if (cluster_ != NULL) {
408 result_ = cluster_->run(*this, nchild, timeout);
409 return result_;
410 }
411 if (conn_ == NULL) {
412 logger_error("ERROR: cluster_ and conn_ are all NULL");
413 return NULL;
414 }
415
416 conn_->set_check_addr(check_addr_);
417
418 if (slice_req_) {
419 if (request_obj_ == NULL) {
420 request_obj_ = NEW redis_request();
421 }
422 result_ = conn_->run(dbuf_, *request_obj_, nchild, timeout);
423 } else {
424 if (request_buf_ == NULL) {
425 request_buf_ = NEW string(128);
426 }
427 result_ = conn_->run(dbuf_, *request_buf_, nchild, timeout);
428 }
429 return result_;
430}
431
432/////////////////////////////////////////////////////////////////////////////
433

Callers

nothing calls this directly

Calls 6

set_optionMethod · 0.80
redis_requestClass · 0.50
stringClass · 0.50
setMethod · 0.45
execMethod · 0.45
set_check_addrMethod · 0.45

Tested by

no test coverage detected