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

Method GetStoreByStoreID

phxqueue/config/storeconfig.cpp:120–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120comm::RetCode StoreConfig::GetStoreByStoreID(const int store_id, shared_ptr<const proto::Store> &store) const {
121 auto it(impl_->store_id2store.find(store_id));
122 if (it == impl_->store_id2store.end()) return comm::RetCode::RET_ERR_RANGE_STORE;
123 store = it->second;
124 return comm::RetCode::RET_OK;
125}
126
127comm::RetCode StoreConfig::GetStoreIDByAddr(const comm::proto::Addr &addr, int &store_id) const {
128 auto &&encoded_addr = comm::utils::EncodeAddr(addr);

Callers 6

GetStoreIDMethod · 0.80
GetCandidateAddrsMethod · 0.80
CheckStoreConfigMethod · 0.80
AddMethod · 0.80
TestStoreConfigMethod · 0.80
GetPubIDsByStoreIDFunction · 0.80

Calls

no outgoing calls

Tested by 3

CheckStoreConfigMethod · 0.64
AddMethod · 0.64
TestStoreConfigMethod · 0.64