| 118 | } |
| 119 | |
| 120 | comm::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 | |
| 127 | comm::RetCode StoreConfig::GetStoreIDByAddr(const comm::proto::Addr &addr, int &store_id) const { |
| 128 | auto &&encoded_addr = comm::utils::EncodeAddr(addr); |
no outgoing calls