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

Method GetSubBySubID

phxqueue/config/topicconfig.cpp:296–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296comm::RetCode TopicConfig::GetSubBySubID(const int sub_id, shared_ptr<const proto::Sub> &sub) const {
297 sub = nullptr;
298
299 auto &&it = impl_->sub_id2sub.find(sub_id);
300 if (impl_->sub_id2sub.end() == it) {
301 return comm::RetCode::RET_ERR_RANGE_SUB;
302 }
303 sub = it->second;
304
305 return comm::RetCode::RET_OK;
306}
307
308
309/******************* queue_info ********************/

Callers 4

CheckTopicConfigMethod · 0.80
TestTopicConfigMethod · 0.80
GetAddrScaleMethod · 0.80
DoLockMethod · 0.80

Calls

no outgoing calls

Tested by 2

CheckTopicConfigMethod · 0.64
TestTopicConfigMethod · 0.64