MCPcopy Create free account
hub / github.com/Tencent/phxqueue / GetQueueByLoopRank

Method GetQueueByLoopRank

phxqueue/config/topicconfig.cpp:435–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435comm::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
447comm::RetCode TopicConfig::GetQueueInfoByQueue(const int queue, shared_ptr<const proto::QueueInfo> &queue_info) const {
448 queue_info = nullptr;

Callers 2

GetQueueIDMethod · 0.80
CheckTopicConfigMethod · 0.80

Calls

no outgoing calls

Tested by 1

CheckTopicConfigMethod · 0.64