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

Method NewLockConfig

phxqueue_phxrpc/plugin/configfactory.cpp:104–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104unique_ptr<phxqueue::config::LockConfig>
105ConfigFactory::NewLockConfig(const int topic_id, const string &path) {
106 QLVerb("topic_id %d path %s", topic_id, path.c_str());
107
108 auto &&conf(new config::LockConfig());
109 conf->SetNeedCheck(impl_->need_check);
110 conf->SetFileIfUnset(path);
111 if (conf) conf->LoadIfModified();
112
113 return unique_ptr<config::LockConfig>(conf);
114}
115
116void ConfigFactory::SetNeedCheck(bool need_check) {
117 impl_->need_check = need_check;

Callers

nothing calls this directly

Calls 3

SetFileIfUnsetMethod · 0.80
LoadIfModifiedMethod · 0.80
SetNeedCheckMethod · 0.45

Tested by

no test coverage detected