| 233 | } |
| 234 | |
| 235 | uint64_t GlobalConfig::GetLastModTime(const int topic_id) { |
| 236 | comm::RetCode ret; |
| 237 | uint64_t res = 0, tmp; |
| 238 | |
| 239 | shared_ptr<const TopicConfig> topic_config; |
| 240 | if (comm::RetCode::RET_OK != (ret = GetTopicConfigByTopicID(topic_id, topic_config))) return 0; |
| 241 | res = topic_config->GetLastModTime(); |
| 242 | |
| 243 | shared_ptr<const ConsumerConfig> consumer_config; |
| 244 | if (comm::RetCode::RET_OK != (ret = GetConsumerConfig(topic_id, consumer_config))) return 0; |
| 245 | tmp = consumer_config->GetLastModTime(); |
| 246 | if (res < tmp) res = tmp; |
| 247 | |
| 248 | shared_ptr<const StoreConfig> store_config; |
| 249 | if (comm::RetCode::RET_OK != (ret = GetStoreConfig(topic_id, store_config))) return 0; |
| 250 | tmp = store_config->GetLastModTime(); |
| 251 | if (res < tmp) res = tmp; |
| 252 | |
| 253 | shared_ptr<const SchedulerConfig> scheduler_config; |
| 254 | if (comm::RetCode::RET_OK != (ret = GetSchedulerConfig(topic_id, scheduler_config))) return 0; |
| 255 | tmp = scheduler_config->GetLastModTime(); |
| 256 | if (res < tmp) res = tmp; |
| 257 | |
| 258 | shared_ptr<const LockConfig> lock_config; |
| 259 | if (comm::RetCode::RET_OK != (ret = GetLockConfig(topic_id, lock_config))) return 0; |
| 260 | tmp = lock_config->GetLastModTime(); |
| 261 | if (res < tmp) res = tmp; |
| 262 | |
| 263 | |
| 264 | return res; |
| 265 | } |
| 266 | |
| 267 | |
| 268 | } // namesapce config |
no outgoing calls
no test coverage detected