| 205 | } |
| 206 | |
| 207 | comm::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 | |
| 221 | comm::RetCode GlobalConfig::GetLockConfig(const int topic_id, shared_ptr<const LockConfig> &lock_config) { |
| 222 | lock_config = nullptr; |