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

Method GetLockConfig

phxqueue/config/globalconfig.cpp:221–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221comm::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
235uint64_t GlobalConfig::GetLastModTime(const int topic_id) {
236 comm::RetCode ret;

Callers 12

ProcessMethod · 0.80
GetLockIDMethod · 0.80
ProcessMethod · 0.80
GetLockInfoMethod · 0.80
AcquireLockMethod · 0.80
TestGlobalConfigMethod · 0.80
PaxosInitMethod · 0.80
CheckMasterMethod · 0.80
InitTopicIDMethod · 0.80
KeepMasterMethod · 0.80
GetCandidateAddrsMethod · 0.80
DoLockMethod · 0.80

Calls 1

LoadMethod · 0.80

Tested by 5

ProcessMethod · 0.64
ProcessMethod · 0.64
GetLockInfoMethod · 0.64
AcquireLockMethod · 0.64
TestGlobalConfigMethod · 0.64