17#ifndef CYBER_SERVICE_DISCOVERY_CONTAINER_WAREHOUSE_BASE_H_
18#define CYBER_SERVICE_DISCOVERY_CONTAINER_WAREHOUSE_BASE_H_
27namespace service_discovery {
34 virtual bool Add(uint64_t key,
const RolePtr& role,
bool ignore_if_exist) = 0;
37 virtual std::size_t
Size() = 0;
39 virtual void Remove(uint64_t key) = 0;
43 virtual bool Search(uint64_t key) = 0;
47 virtual bool Search(uint64_t key, std::vector<RolePtr>* matched_roles) = 0;
49 uint64_t key, std::vector<proto::RoleAttributes>* matched_roles_attr) = 0;
57 std::vector<RolePtr>* matched_roles) = 0;
60 std::vector<proto::RoleAttributes>* matched_roles_attr) = 0;
63 virtual void GetAllRoles(std::vector<proto::RoleAttributes>* roles_attr) = 0;
virtual void Remove(uint64_t key, const RolePtr &role)=0
virtual bool Search(const proto::RoleAttributes &target_attr, std::vector< proto::RoleAttributes > *matched_roles_attr)=0
virtual bool Search(uint64_t key, RolePtr *first_matched_role)=0
virtual void Remove(uint64_t key)=0
virtual void Remove(const proto::RoleAttributes &target_attr)=0
virtual bool Search(const proto::RoleAttributes &target_attr, std::vector< RolePtr > *matched_roles)=0
virtual bool Search(const proto::RoleAttributes &target_attr)=0
virtual bool Search(const proto::RoleAttributes &target_attr, proto::RoleAttributes *first_matched_role_attr)=0
virtual bool Search(uint64_t key)=0
virtual bool Search(uint64_t key, std::vector< RolePtr > *matched_roles)=0
virtual void GetAllRoles(std::vector< RolePtr > *roles)=0
virtual void GetAllRoles(std::vector< proto::RoleAttributes > *roles_attr)=0
virtual bool Search(const proto::RoleAttributes &target_attr, RolePtr *first_matched)=0
virtual bool Search(uint64_t key, proto::RoleAttributes *first_matched_role_attr)=0
virtual bool Search(uint64_t key, std::vector< proto::RoleAttributes > *matched_roles_attr)=0
virtual std::size_t Size()=0
virtual bool Add(uint64_t key, const RolePtr &role, bool ignore_if_exist)=0
std::shared_ptr< RoleBase > RolePtr