| 433 | } |
| 434 | |
| 435 | comm::RetCode TopicConfig::GetQueueByLoopRank(const int queue_info_id, const uint64_t rank, int &queue) const { |
| 436 | comm::RetCode ret; |
| 437 | int nqueue{0}; |
| 438 | if (comm::RetCode::RET_OK != (ret = GetNQueue(queue_info_id, nqueue))) { |
| 439 | return ret; |
| 440 | } |
| 441 | if (0 == nqueue) { |
| 442 | return comm::RetCode::RET_ERR_NQUEUE_INVALID; |
| 443 | } |
| 444 | return GetQueueByRank(queue_info_id, rank % nqueue, queue); |
| 445 | } |
| 446 | |
| 447 | comm::RetCode TopicConfig::GetQueueInfoByQueue(const int queue, shared_ptr<const proto::QueueInfo> &queue_info) const { |
| 448 | queue_info = nullptr; |
no outgoing calls