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

Method GetTopicConfigByTopicID

phxqueue/config/globalconfig.cpp:135–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135comm::RetCode GlobalConfig::GetTopicConfigByTopicID(const int topic_id, shared_ptr<const TopicConfig> &topic_config) {
136 topic_config = nullptr;
137
138 auto it = impl_->topic_id2topic_config.find(topic_id);
139 if (it == impl_->topic_id2topic_config.end()) {
140 NeedRebuild();
141 return comm::RetCode::RET_ERR_RANGE_TOPIC;
142 }
143 if (!it->second) return comm::RetCode::RET_ERR_RANGE_TOPIC;
144 it->second->Load();
145 topic_config = it->second;
146 return comm::RetCode::RET_OK;
147}
148
149
150comm::RetCode GlobalConfig::GetAllTopicConfig(vector<shared_ptr<const TopicConfig> > &topic_configs) const {

Callers 15

ProcessMethod · 0.80
GetAddrScaleMethod · 0.80
GetModeMethod · 0.80
UpdateLiveMethod · 0.80
CheckImbalanceMethod · 0.80
AdjustScaleMethod · 0.80
IsForceMasterMethod · 0.80
KeepMasterMethod · 0.80
DoRunMethod · 0.80
GetQueueIDMethod · 0.80
EnqueueMethod · 0.80
MakeAddRequestsMethod · 0.80

Calls 1

LoadMethod · 0.80

Tested by 4

ProcessMethod · 0.64
ProcessMethod · 0.64
TestGlobalConfigMethod · 0.64