#include <multi_value_warehouse.h>
|
| MultiValueWarehouse () |
|
virtual | ~MultiValueWarehouse () |
|
bool | Add (uint64_t key, const RolePtr &role, bool ignore_if_exist=true) override |
|
void | Clear () override |
|
std::size_t | Size () override |
|
void | Remove (uint64_t key) override |
|
void | Remove (uint64_t key, const RolePtr &role) override |
|
void | Remove (const proto::RoleAttributes &target_attr) override |
|
bool | Search (uint64_t key) override |
|
bool | Search (uint64_t key, RolePtr *first_matched_role) override |
|
bool | Search (uint64_t key, proto::RoleAttributes *first_matched_role_attr) override |
|
bool | Search (uint64_t key, std::vector< RolePtr > *matched_roles) override |
|
bool | Search (uint64_t key, std::vector< proto::RoleAttributes > *matched_roles_attr) override |
|
bool | Search (const proto::RoleAttributes &target_attr) override |
|
bool | Search (const proto::RoleAttributes &target_attr, RolePtr *first_matched) override |
|
bool | Search (const proto::RoleAttributes &target_attr, proto::RoleAttributes *first_matched_role_attr) override |
|
bool | Search (const proto::RoleAttributes &target_attr, std::vector< RolePtr > *matched_roles) override |
|
bool | Search (const proto::RoleAttributes &target_attr, std::vector< proto::RoleAttributes > *matched_roles_attr) override |
|
void | GetAllRoles (std::vector< RolePtr > *roles) override |
|
void | GetAllRoles (std::vector< proto::RoleAttributes > *roles_attr) override |
|
| WarehouseBase () |
|
virtual | ~WarehouseBase () |
|
◆ RoleMap
◆ MultiValueWarehouse()
apollo::cyber::service_discovery::MultiValueWarehouse::MultiValueWarehouse |
( |
| ) |
|
|
inline |
◆ ~MultiValueWarehouse()
virtual apollo::cyber::service_discovery::MultiValueWarehouse::~MultiValueWarehouse |
( |
| ) |
|
|
inlinevirtual |
◆ Add()
bool apollo::cyber::service_discovery::MultiValueWarehouse::Add |
( |
uint64_t |
key, |
|
|
const RolePtr & |
role, |
|
|
bool |
ignore_if_exist = true |
|
) |
| |
|
overridevirtual |
◆ Clear()
void apollo::cyber::service_discovery::MultiValueWarehouse::Clear |
( |
| ) |
|
|
overridevirtual |
◆ GetAllRoles() [1/2]
void apollo::cyber::service_discovery::MultiValueWarehouse::GetAllRoles |
( |
std::vector< proto::RoleAttributes > * |
roles_attr | ) |
|
|
overridevirtual |
◆ GetAllRoles() [2/2]
void apollo::cyber::service_discovery::MultiValueWarehouse::GetAllRoles |
( |
std::vector< RolePtr > * |
roles | ) |
|
|
overridevirtual |
◆ Remove() [1/3]
void apollo::cyber::service_discovery::MultiValueWarehouse::Remove |
( |
const proto::RoleAttributes & |
target_attr | ) |
|
|
overridevirtual |
◆ Remove() [2/3]
void apollo::cyber::service_discovery::MultiValueWarehouse::Remove |
( |
uint64_t |
key | ) |
|
|
overridevirtual |
◆ Remove() [3/3]
void apollo::cyber::service_discovery::MultiValueWarehouse::Remove |
( |
uint64_t |
key, |
|
|
const RolePtr & |
role |
|
) |
| |
|
overridevirtual |
◆ Search() [1/10]
bool apollo::cyber::service_discovery::MultiValueWarehouse::Search |
( |
const proto::RoleAttributes & |
target_attr | ) |
|
|
overridevirtual |
◆ Search() [2/10]
◆ Search() [3/10]
◆ Search() [4/10]
◆ Search() [5/10]
bool apollo::cyber::service_discovery::MultiValueWarehouse::Search |
( |
const proto::RoleAttributes & |
target_attr, |
|
|
std::vector< RolePtr > * |
matched_roles |
|
) |
| |
|
overridevirtual |
◆ Search() [6/10]
bool apollo::cyber::service_discovery::MultiValueWarehouse::Search |
( |
uint64_t |
key | ) |
|
|
overridevirtual |
◆ Search() [7/10]
bool apollo::cyber::service_discovery::MultiValueWarehouse::Search |
( |
uint64_t |
key, |
|
|
proto::RoleAttributes * |
first_matched_role_attr |
|
) |
| |
|
overridevirtual |
◆ Search() [8/10]
bool apollo::cyber::service_discovery::MultiValueWarehouse::Search |
( |
uint64_t |
key, |
|
|
RolePtr * |
first_matched_role |
|
) |
| |
|
overridevirtual |
◆ Search() [9/10]
bool apollo::cyber::service_discovery::MultiValueWarehouse::Search |
( |
uint64_t |
key, |
|
|
std::vector< proto::RoleAttributes > * |
matched_roles_attr |
|
) |
| |
|
overridevirtual |
实现了 apollo::cyber::service_discovery::WarehouseBase.
在文件 multi_value_warehouse.cc 第 126 行定义.
127 {
129 bool find = false;
130 ReadLockGuard<AtomicRWLock> lock(rw_lock_);
131 auto range = roles_.equal_range(key);
132 for_each(range.first, range.second,
133 [&matched_roles_attr, &find](RoleMap::value_type& item) {
134 matched_roles_attr->emplace_back(item.second->attributes());
135 find = true;
136 });
137 return find;
138}
◆ Search() [10/10]
bool apollo::cyber::service_discovery::MultiValueWarehouse::Search |
( |
uint64_t |
key, |
|
|
std::vector< RolePtr > * |
matched_roles |
|
) |
| |
|
overridevirtual |
实现了 apollo::cyber::service_discovery::WarehouseBase.
在文件 multi_value_warehouse.cc 第 112 行定义.
113 {
115 bool find = false;
116 ReadLockGuard<AtomicRWLock> lock(rw_lock_);
117 auto range = roles_.equal_range(key);
118 for_each(range.first, range.second,
119 [&matched_roles, &find](RoleMap::value_type& item) {
120 matched_roles->emplace_back(item.second);
121 find = true;
122 });
123 return find;
124}
◆ Size()
std::size_t apollo::cyber::service_discovery::MultiValueWarehouse::Size |
( |
| ) |
|
|
overridevirtual |
该类的文档由以下文件生成: