13 : table_(table), entry_(entry), resource_id_(0), vxlan_id_(0),
75 assert(vxlan_id == 0);
99 std::map<uint32_t, ResourceEntry*>::iterator tbl_it =
103 res_entry = tbl_it->second;
123 uint32_t resource_id) {
124 std::map<uint32_t, ResourceEntry*>::iterator tbl_it =
129 if (resource_id == 0) {
130 assert(res_entry->active_entry == entry);
131 ResourcePendingList::iterator it = res_entry->pending_list.begin();
132 if (it == res_entry->pending_list.end()) {
136 (*it)->resource_id_ = 0;
137 res_entry->active_entry = (*it);
145 res_entry->pending_list.erase(it);
146 if (res_entry->pending_list.empty()) {
147 res_entry->resource_id_count_ = 1;
153 ResourcePendingList::iterator it = res_entry->pending_list.find(&key);
154 assert(it != res_entry->pending_list.end());
155 res_entry->pending_list.erase(it);
void Change(KSyncEntry *entry)
bool AcquireVxLanId(OvsdbResourceVxLanId *entry, uint32_t vxlan_id)
void ReleaseVxLanId(bool active)
OvsdbResourceVxLanIdTable()
uint32_t resource_id_count_
uint32_t active_vxlan_id_
OvsdbResourceVxLanIdTable * table_
OvsdbResourceVxLanId * active_entry
bool AcquireVxLanId(uint32_t vxlan_id)
ResourcePendingList pending_list
virtual KSyncObject * GetObject() const =0
void set_active_vxlan_id(uint32_t vxlan_id)
virtual ~OvsdbResourceVxLanIdTable()
OvsdbResourceVxLanId(OvsdbResourceVxLanIdTable *table, KSyncEntry *entry)
virtual ~OvsdbResourceVxLanId()
std::map< uint32_t, ResourceEntry * > vxlan_table_
void ReleaseVxLanId(OvsdbResourceVxLanId *entry, uint32_t vxlan_id, uint32_t resource_id)
uint32_t active_vxlan_id() const