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

Method GetSchedulerConfig

phxqueue/config/globalconfig.cpp:207–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207comm::RetCode GlobalConfig::GetSchedulerConfig(const int topic_id, shared_ptr<const SchedulerConfig> &scheduler_config) {
208 scheduler_config = nullptr;
209
210 auto &&it = impl_->topic_id2scheduler_config.find(topic_id);
211 if (it == impl_->topic_id2scheduler_config.end()) {
212 NeedRebuild();
213 return comm::RetCode::RET_ERR_RANGE_TOPIC;
214 }
215 if (!it->second) return comm::RetCode::RET_ERR_RANGE_TOPIC;
216 it->second->Load();
217 scheduler_config = it->second;
218 return comm::RetCode::RET_OK;
219}
220
221comm::RetCode GlobalConfig::GetLockConfig(const int topic_id, shared_ptr<const LockConfig> &lock_config) {
222 lock_config = nullptr;

Callers 5

ProcessMethod · 0.80
InitTopicIDMethod · 0.80
GetCandidateAddrsMethod · 0.80
ProcessMethod · 0.80
TestGlobalConfigMethod · 0.80

Calls 1

LoadMethod · 0.80

Tested by 3

ProcessMethod · 0.64
ProcessMethod · 0.64
TestGlobalConfigMethod · 0.64