| 219 | } |
| 220 | |
| 221 | comm::RetCode GlobalConfig::GetLockConfig(const int topic_id, shared_ptr<const LockConfig> &lock_config) { |
| 222 | lock_config = nullptr; |
| 223 | |
| 224 | auto &&it = impl_->topic_id2lock_config.find(topic_id); |
| 225 | if (it == impl_->topic_id2lock_config.end()) { |
| 226 | NeedRebuild(); |
| 227 | return comm::RetCode::RET_ERR_RANGE_TOPIC; |
| 228 | } |
| 229 | if (!it->second) return comm::RetCode::RET_ERR_RANGE_TOPIC; |
| 230 | it->second->Load(); |
| 231 | lock_config = it->second; |
| 232 | return comm::RetCode::RET_OK; |
| 233 | } |
| 234 | |
| 235 | uint64_t GlobalConfig::GetLastModTime(const int topic_id) { |
| 236 | comm::RetCode ret; |