OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ifmap_graph_walker.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 
6 
7 #include <boost/assign/list_of.hpp>
8 #include <boost/bind.hpp>
9 
10 #include "base/logging.h"
11 #include "base/task_trigger.h"
12 #include "db/db_graph.h"
13 #include "db/db_table.h"
14 #include "ifmap/ifmap_client.h"
15 #include "ifmap/ifmap_exporter.h"
16 #include "ifmap/ifmap_link.h"
17 #include "ifmap/ifmap_log.h"
18 #include "ifmap/ifmap_table.h"
19 #include "ifmap/ifmap_server.h"
20 #include "ifmap/ifmap_log_types.h"
21 #include "ifmap/ifmap_update.h"
22 #include "ifmap/ifmap_util.h"
23 #include "schema/vnc_cfg_types.h"
24 
25 using boost::assign::list_of;
26 using boost::assign::map_list_of;
27 using std::set;
28 using std::string;
29 
31 public:
33  const IFMapTypenameWhiteList *type_filter,
34  const BitSet &bitset)
35  : exporter_(exporter),
36  type_filter_(type_filter),
37  bset_(bitset) {
38  }
39 
40  bool VertexFilter(const DBGraphVertex *vertex) const {
41  return type_filter_->VertexFilter(vertex);
42  }
43 
44  bool EdgeFilter(const DBGraphVertex *source, const DBGraphVertex *target,
45  const DBGraphEdge *edge) const {
46  const IFMapNode *tgt = static_cast<const IFMapNode *>(target);
47  const IFMapNodeState *state = NodeStateLookup(tgt);
48  if (state != NULL && state->interest().Contains(bset_)) {
49  return false;
50  }
51 
52  return true;
53  }
54 
55  const IFMapNodeState *NodeStateLookup(const IFMapNode *node) const {
56  const DBTable *table = node->table();
57  const DBState *state =
58  node->GetState(table, exporter_->TableListenerId(table));
59  return static_cast<const IFMapNodeState *>(state);
60  }
61 
63  const DBGraphVertex *vertex) const {
64  return type_filter_->AllowedEdges(vertex);
65  }
66 private:
69  const BitSet &bset_;
70 };
71 
73  : graph_(graph),
74  exporter_(exporter),
75  link_delete_walk_trigger_(new TaskTrigger(
76  boost::bind(&IFMapGraphWalker::LinkDeleteWalk, this),
77  TaskScheduler::GetInstance()->GetTaskId("db::IFMapTable"), 0)),
78  walk_client_index_(BitSet::npos) {
81 }
82 
84 }
85 
87  DBTable *table = exporter_->link_table();
88  table->Change(edge);
89 }
90 
92  IFMapNode *node = static_cast<IFMapNode *>(vertex);
94  IFMAP_DEBUG(JoinVertex, vertex->ToString(), state->interest().ToString(),
95  bset.ToString());
96  exporter_->StateInterestOr(state, bset);
97  node->table()->Change(node);
98 }
99 
101  const BitSet &bset) {
103  graph_->Visit(rnode,
104  boost::bind(&IFMapGraphWalker::JoinVertex, this, _1, bset),
105  boost::bind(&IFMapGraphWalker::NotifyEdge, this, _1, bset),
106  filter);
107 }
108 
109 void IFMapGraphWalker::LinkAdd(IFMapLink *link, IFMapNode *lnode, const BitSet &lhs,
110  IFMapNode *rnode, const BitSet &rhs) {
111  IFMAP_DEBUG(LinkOper, "LinkAdd", lnode->ToString(), rnode->ToString(),
112  lhs.ToString(), rhs.ToString());
113 
114  // Ensure that nodes are passed are indeed nodes and not links.
115  assert(dynamic_cast<IFMapNode *>(lnode));
116  assert(dynamic_cast<IFMapNode *>(rnode));
117 
118  assert(!dynamic_cast<IFMapLink *>(lnode));
119  assert(!dynamic_cast<IFMapLink *>(rnode));
120 
121  if (!lhs.empty() && !rhs.Contains(lhs) &&
122  traversal_white_list_->VertexFilter(rnode) &&
123  traversal_white_list_->EdgeFilter(lnode, rnode, link)) {
124  ProcessLinkAdd(lnode, rnode, lhs);
125  }
126  if (!rhs.empty() && !lhs.Contains(rhs) &&
127  traversal_white_list_->VertexFilter(lnode) &&
128  traversal_white_list_->EdgeFilter(rnode, lnode, link)) {
129  ProcessLinkAdd(rnode, lnode, rhs);
130  }
131 }
132 
134  OrLinkDeleteClients(bset); // link_delete_clients_ | bset
136 }
137 
138 // Check if the neighbor or link to neighbor should be filtered. Returns true
139 // if rnode or link to rnode should be filtered.
141  IFMapNode *rnode = link->left();
142  if (rnode == lnode)
143  rnode = link->right();
144  if (!traversal_white_list_->VertexFilter(rnode) ||
145  !traversal_white_list_->EdgeFilter(lnode, NULL, link)) {
146  return true;
147  }
148  return false;
149 }
150 
152  IFMapNode *node = static_cast<IFMapNode *>(vertex);
153  IFMapNodeState *state = exporter_->NodeStateLocate(node);
154  state->nmask_set(bit);
155  UpdateNewReachableNodesTracker(bit, state);
156 }
157 
159  if (link_delete_clients_.empty()) {
161  return true;
162  }
163 
164  IFMapServer *server = exporter_->server();
165  size_t i;
166 
167  // Get the index of the client we want to start with.
170  } else {
171  // walk_client_index_ was the last client that we finished processing.
173  }
174  int count = 0;
175  BitSet done_set;
176  while (i != BitSet::npos) {
177  IFMapClient *client = server->GetClient(i);
178  assert(client);
180 
181  IFMapTable *table = IFMapTable::FindTable(server->database(),
182  "virtual-router");
183  IFMapNode *node = table->FindNode(client->identifier());
184  if ((node != NULL) && node->IsVertexValid()) {
185  graph_->Visit(node,
186  boost::bind(&IFMapGraphWalker::RecomputeInterest, this, _1, i),
187  0, *traversal_white_list_.get());
188  }
189  done_set.set(i);
190  if (++count == kMaxLinkDeleteWalks) {
191  // client 'i' has been processed. If 'i' is the last bit set, we
192  // will return true below. Else we will return false and there
193  // is atleast one more bit left to process.
194  break;
195  }
196 
198  }
199  // Remove the subset of clients that we have finished processing.
200  ResetLinkDeleteClients(done_set);
201 
202  LinkDeleteWalkBatchEnd(done_set);
203 
204  if (link_delete_clients_.empty()) {
206  return true;
207  } else {
208  walk_client_index_ = i;
209  return false;
210  }
211 }
212 
214  link_delete_clients_.Set(bset); // link_delete_clients_ | bset
215 }
216 
219 }
220 
221 void IFMapGraphWalker::CleanupInterest(int client_index, IFMapNode *node,
222  IFMapNodeState *state) {
223  BitSet rm_mask;
224  rm_mask.set(client_index);
225 
226  // interest = interest - rm_mask + nmask
227 
228  if (!state->interest().empty() && !state->nmask().empty()) {
230  state->interest().ToString(), rm_mask.ToString(),
231  state->nmask().ToString());
232  }
233  BitSet ninterest;
234  ninterest.BuildComplement(state->interest(), rm_mask);
235  ninterest |= state->nmask();
236  state->nmask_clear();
237  if (state->interest() == ninterest) {
238  return;
239  }
240 
241  exporter_->StateInterestSet(state, ninterest);
242  node->table()->Change(node);
243 
244  // Mark all dependent links as potentially modified.
245  for (IFMapNodeState::iterator iter = state->begin();
246  iter != state->end(); ++iter) {
247  DBTable *table = exporter_->link_table();
248  table->Change(iter.operator->());
249  }
250 }
251 
252 // Cleanup all the graph nodes that were reachable before this link delete.
253 // After this link delete, these nodes may still be reachable. But, its
254 // also possible that the link delete has made them unreachable.
256  IFMapState *state = NULL;
257  IFMapNode *node = NULL;
259  IFMapExporter::INTEREST, client_index);
261  IFMapExporter::INTEREST, client_index);
262 
263  while (iter != end_iter) {
264  state = *iter;
265  // Get the iterator to the next element before calling
266  // CleanupInterest() since the state might be removed from the
267  // client's config-tracker, thereby invalidating the iterator of the
268  // container we are iterating over.
269  ++iter;
270  if (state->IsNode()) {
271  node = state->GetIFMapNode();
272  assert(node);
273  IFMapNodeState *nstate = exporter_->NodeStateLookup(node);
274  assert(state == nstate);
275  CleanupInterest(client_index, node, nstate);
276  }
277  }
278 }
279 
280 // Cleanup all the graph nodes that were not reachable before the link delete
281 // but are reachable now. Note, we store nodes in new_reachable_nodes_tracker_
282 // only if we visited them during the graph-walk via RecomputeInterest() and if
283 // their interest bit was not set i.e. they were not reachable before we
284 // started the walk.
286  IFMapState *state = NULL;
287  IFMapNode *node = NULL;
288  ReachableNodesSet *rnset = new_reachable_nodes_tracker_.at(client_index);
289 
290  for (Rns_citer iter = rnset->begin(); iter != rnset->end(); ++iter) {
291  state = *iter;
292  assert(state->IsNode());
293  node = state->GetIFMapNode();
294  assert(node);
295  IFMapNodeState *nstate = exporter_->NodeStateLookup(node);
296  assert(state == nstate);
297  CleanupInterest(client_index, node, nstate);
298  }
299  DeleteNewReachableNodesTracker(client_index);
300 }
301 
303  for (size_t i = done_set.find_first(); i != BitSet::npos;
304  i = done_set.find_next(i)) {
305  // Examine all the nodes that were reachable before the link delete.
307  // Examine all the nodes that were not reachable before the link
308  // delete but are now reachable.
310  }
311 }
312 
314  if (client_index >= (int)new_reachable_nodes_tracker_.size()) {
315  new_reachable_nodes_tracker_.resize(client_index + 1, NULL);
316  }
317  assert(new_reachable_nodes_tracker_[client_index] == NULL);
318  ReachableNodesSet *rnset = new ReachableNodesSet();
319  new_reachable_nodes_tracker_[client_index] = rnset;
320 }
321 
323  ReachableNodesSet *rnset = new_reachable_nodes_tracker_.at(client_index);
324  assert(rnset);
325  delete rnset;
326  new_reachable_nodes_tracker_[client_index] = NULL;
327 }
328 
329 // Keep track of this node if it was unreachable earlier.
331  IFMapState *state) {
332  ReachableNodesSet *rnset = new_reachable_nodes_tracker_.at(client_index);
333  assert(rnset);
334  // If the interest is not set, the node was not reachable earlier but is
335  // reachable now.
336  if (!state->interest().test(client_index)) {
337  rnset->insert(state);
338  }
339 }
340 
342  const {
343  return *traversal_white_list_.get();
344 }
345 
346 // The nodes listed below and the nodes in
347 // IFMapGraphTraversalFilterCalculator::CreateNodeBlackList() are mutually
348 // exclusive
350  traversal_white_list_->include_vertex = map_list_of<std::string, std::set<std::string> >
351  ("virtual-router",
352  list_of("physical-router-virtual-router")
353  ("virtual-router-virtual-machine")
354  ("virtual-router-network-ipam")
355  ("global-system-config-virtual-router")
356  ("provider-attachment-virtual-router")
357  ("virtual-router-virtual-machine-interface")
358  ("virtual-router-sub-cluster")
359  .convert_to_container<set<string> >())
360  ("virtual-router-network-ipam", list_of("virtual-router-network-ipam")
361  .convert_to_container<set<string> >())
362  ("virtual-machine",
363  list_of("virtual-machine-service-instance")
364  ("virtual-machine-interface-virtual-machine")
365  ("virtual-machine-tag")
366  .convert_to_container<set<string> >())
367  ("control-node-zone", set<string>())
368  ("sub-cluster",
369  list_of("bgp-router-sub-cluster")
370  .convert_to_container<set<string> >())
371  ("bgp-router",
372  list_of("instance-bgp-router")
373  ("physical-router-bgp-router")
374  ("bgp-router-control-node-zone")
375  .convert_to_container<set<string> >())
376  ("bgp-as-a-service",
377  list_of("bgpaas-bgp-router")
378  ("bgpaas-health-check")
379  ("bgpaas-control-node-zone")
380  .convert_to_container<set<string> >())
381  ("bgpaas-control-node-zone", list_of("bgpaas-control-node-zone")
382  .convert_to_container<set<string> >())
383  ("global-system-config",
384  list_of("global-system-config-global-vrouter-config")
385  ("global-system-config-global-qos-config")
386  ("global-system-config-bgp-router")
387  ("qos-config-global-system-config")
388  .convert_to_container<set<string> >())
389  ("provider-attachment", set<string>())
390  ("service-instance", list_of("service-instance-service-template")
391  ("service-instance-port-tuple")
392  .convert_to_container<set<string> >())
393  ("global-vrouter-config",
394  list_of("application-policy-set-global-vrouter-config")
395  ("global-vrouter-config-security-logging-object")
396  .convert_to_container<set<string> >())
397  ("virtual-machine-interface",
398  list_of("virtual-machine-virtual-machine-interface")
399  ("virtual-machine-interface-sub-interface")
400  ("instance-ip-virtual-machine-interface")
401  ("virtual-machine-interface-virtual-network")
402  ("virtual-machine-interface-security-group")
403  ("floating-ip-virtual-machine-interface")
404  ("alias-ip-virtual-machine-interface")
405  ("customer-attachment-virtual-machine-interface")
406  ("virtual-machine-interface-routing-instance")
407  ("virtual-machine-interface-route-table")
408  ("subnet-virtual-machine-interface")
409  ("service-port-health-check")
410  ("bgpaas-virtual-machine-interface")
411  ("virtual-machine-interface-qos-config")
412  ("virtual-machine-interface-bridge-domain")
413  ("virtual-machine-interface-security-logging-object")
414  ("project-virtual-machine-interface")
415  ("port-tuple-interface")
416  ("virtual-machine-interface-tag")
417  ("virtual-machine-interface-bgp-router")
418  .convert_to_container<set<string> >())
419  ("virtual-machine-interface-bridge-domain",
420  list_of("virtual-machine-interface-bridge-domain")
421  .convert_to_container<set<string> >())
422  ("security-group", list_of("security-group-access-control-list")
423  .convert_to_container<set<string> >())
424  ("physical-router",
425  list_of("physical-router-physical-interface")
426  ("physical-router-logical-interface")
427  ("physical-router-virtual-network")
428  .convert_to_container<set<string> >())
429  ("service-template", list_of("domain-service-template")
430  .convert_to_container<set<string> >())
431  ("instance-ip", list_of("instance-ip-virtual-network")
432  .convert_to_container<set<string> >())
433  ("virtual-network",
434  list_of("virtual-network-floating-ip-pool")
435  ("virtual-network-alias-ip-pool")
436  ("virtual-network-network-ipam")
437  ("virtual-network-access-control-list")
438  ("virtual-network-routing-instance")
439  ("virtual-network-qos-config")
440  ("virtual-network-bridge-domain")
441  ("virtual-network-security-logging-object")
442  ("virtual-network-tag")
443  ("virtual-network-provider-network")
444  ("virtual-network-multicast-policy")
445  ("vn-health-check")
446  ("host-based-service-virtual-network")
447  ("project-virtual-network")
448  .convert_to_container<set<string> >())
449  ("floating-ip", list_of("floating-ip-pool-floating-ip")
450  ("instance-ip-floating-ip").convert_to_container<set<string> >())
451  ("alias-ip", list_of("alias-ip-pool-alias-ip")
452  .convert_to_container<set<string> >())
453  ("customer-attachment", set<string>())
454  ("virtual-machine-interface-routing-instance",
455  list_of("virtual-machine-interface-routing-instance")
456  .convert_to_container<set<string> >())
457  ("physical-interface", list_of("physical-interface-logical-interface")
458  ("virtual-port-group-physical-interface")
459  .convert_to_container<set<string> >())
460  ("virtual-port-group-physical-interface",
461  list_of("virtual-port-group-physical-interface")
462  .convert_to_container<std::set<std::string> >())
463  ("virtual-port-group",
464  list_of("virtual-port-group-virtual-machine-interface")
465  ("virtual-port-group-physical-interface")
466  .convert_to_container<std::set<std::string> >())
467  ("domain", list_of("domain-namespace")("domain-virtual-DNS")
468  .convert_to_container<set<string> >())
469  ("floating-ip-pool", list_of("virtual-network-floating-ip-pool")
470  .convert_to_container<set<string> >())
471  ("alias-ip-pool", list_of("virtual-network-alias-ip-pool")
472  .convert_to_container<set<string> >())
473  ("logical-interface", list_of("logical-interface-virtual-machine-interface")
474  .convert_to_container<set<string> >())
475  ("logical-router-virtual-network", list_of("logical-router-virtual-network")
476  .convert_to_container<set<string> >())
477  ("logical-router", list_of("logical-router-virtual-network")
478  ("logical-router-interface")
479  .convert_to_container<set<string> >())
480  ("virtual-network-network-ipam", list_of("virtual-network-network-ipam")
481  .convert_to_container<set<string> >())
482  ("access-control-list", set<string>())
483  ("routing-instance", set<string>())
484  ("namespace", set<string>())
485  ("virtual-DNS", list_of("virtual-DNS-virtual-DNS-record")
486  .convert_to_container<set<string> >())
487  ("network-ipam", list_of("network-ipam-virtual-DNS")
488  .convert_to_container<set<string> >())
489  ("virtual-DNS-record", std::set<std::string>())
490  ("interface-route-table", std::set<std::string>())
491  ("subnet", std::set<std::string>())
492  ("service-health-check", std::set<std::string>())
493  ("qos-config", std::set<std::string>())
494  ("qos-queue", std::set<std::string>())
495  ("forwarding-class", list_of("forwarding-class-qos-queue")
496  .convert_to_container<set<string> >())
497  ("global-qos-config",
498  list_of("global-qos-config-forwarding-class")
499  ("global-qos-config-qos-queue")
500  ("global-qos-config-qos-config")
501  .convert_to_container<set<string> >())
502  ("bridge-domain", std::set<std::string>())
503  ("security-logging-object",
504  list_of("virtual-network-security-logging-object")
505  ("virtual-machine-interface-security-logging-object")
506  ("global-vrouter-config-security-logging-object")
507  ("security-logging-object-network-policy")
508  ("security-logging-object-security-group")
509  .convert_to_container<set<string> >())
510  ("tag", list_of("application-policy-set-tag")
511  .convert_to_container<std::set<std::string> >())
512  ("application-policy-set", list_of("application-policy-set-firewall-policy")
513  ("policy-management-application-policy-set")
514  .convert_to_container<std::set<std::string> >())
515  ("application-policy-set-firewall-policy",
516  list_of("application-policy-set-firewall-policy")
517  .convert_to_container<std::set<std::string> >())
518  ("firewall-policy", list_of("firewall-policy-firewall-rule")
519  ("firewall-policy-security-logging-object")
520  .convert_to_container<std::set<std::string> >())
521  ("firewall-policy-firewall-rule",
522  list_of("firewall-policy-firewall-rule")
523  .convert_to_container<std::set<std::string> >())
524  ("firewall-policy-security-logging-object",
525  list_of("firewall-policy-security-logging-object")
526  .convert_to_container<std::set<std::string> >())
527  ("firewall-rule", list_of("firewall-rule-tag")
528  ("firewall-rule-service-group")
529  ("firewall-rule-address-group")
530  ("firewall-rule-security-logging-object")
531  .convert_to_container<std::set<std::string> >())
532  ("firewall-rule-security-logging-object",
533  list_of("firewall-rule-security-logging-object")
534  .convert_to_container<std::set<std::string> >())
535  ("service-group", std::set<std::string>())
536  ("address-group", list_of("address-group-tag")
537  .convert_to_container<std::set<std::string> >())
538  ("host-based-service", list_of("host-based-service-virtual-network")
539  .convert_to_container<std::set<std::string> >())
540  ("host-based-service-virtual-network", list_of("virtual-network")
541  .convert_to_container<std::set<std::string> >())
542  ("project", list_of("project-tag")
543  ("project-logical-router")
544  ("project-host-based-service")
545  .convert_to_container<std::set<std::string> >())
546  ("port-tuple", list_of("service-instance-port-tuple")
547  ("port-tuple-interface")
548  .convert_to_container<std::set<std::string> >())
549  ("policy-management", std::set<std::string>())
550  ("multicast-policy", list_of("virtual-network-multicast-policy")
551  .convert_to_container<std::set<std::string> >())
552  .convert_to_container<VertexEdgeMap>();
553 }
void OldReachableNodesCleanupInterest(int client_index)
const BitSet & nmask() const
Definition: ifmap_update.h:193
void NotifyEdge(DBGraphEdge *edge, const BitSet &bset)
virtual const std::string & identifier() const =0
void CleanupInterest(int client_index, IFMapNode *node, IFMapNodeState *state)
const IFMapTypenameWhiteList & get_traversal_white_list() const
void AddNewReachableNodesTracker(int client_index)
static const int kMaxLinkDeleteWalks
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
Definition: task.h:178
void RecomputeInterest(DBGraphVertex *vertex, int bit)
void JoinVertex(DBGraphVertex *vertex, const BitSet &bset)
DBState * GetState(DBTableBase *tbl_base, ListenerId listener) const
Definition: db_entry.cc:37
bool test(size_t pos) const
Definition: bitset.cc:146
int index() const
Definition: ifmap_client.h:31
DBGraph::VisitorFilter::AllowedEdgeRetVal AllowedEdges(const DBGraphVertex *vertex) const
virtual std::string ToString() const
Definition: ifmap_node.cc:31
GraphPropagateFilter(IFMapExporter *exporter, const IFMapTypenameWhiteList *type_filter, const BitSet &bitset)
iterator begin()
Definition: ifmap_update.h:187
std::string ToString() const
Definition: bitset.cc:551
const BitSet & interest() const
Definition: ifmap_update.h:129
std::unique_ptr< IFMapTypenameWhiteList > traversal_white_list_
void ResetLinkDeleteClients(const BitSet &bset)
DBTable * link_table()
void Reset(const BitSet &rhs)
Definition: bitset.cc:470
const IFMapTypenameWhiteList * type_filter_
boost::scoped_ptr< TaskTrigger > link_delete_walk_trigger_
virtual void Change(DBEntryBase *entry)
Definition: db_table.cc:407
void UpdateNewReachableNodesTracker(int client_index, IFMapState *state)
bool EdgeFilter(const DBGraphVertex *source, const DBGraphVertex *target, const DBGraphEdge *edge) const
void StateInterestSet(IFMapState *state, const BitSet &interest_bits)
bool Contains(const BitSet &rhs) const
Definition: bitset.cc:536
ReachableNodesTracker new_reachable_nodes_tracker_
IFMapTable * table()
Definition: ifmap_node.h:29
void NewReachableNodesCleanupInterest(int client_index)
IFMapServer * server()
bool empty() const
Definition: bitset.cc:165
Cs_citer ClientConfigTrackerEnd(TrackerType tracker_type, int index) const
Cs_citer ClientConfigTrackerBegin(TrackerType tracker_type, int index) const
DBTable::ListenerId TableListenerId(const DBTable *table) const
#define IFMAP_DEBUG(obj,...)
Definition: ifmap_log.h:33
void nmask_set(int bit)
Definition: ifmap_update.h:195
IFMapNodeState * NodeStateLocate(IFMapNode *node)
IFMapClient * GetClient(int index)
void ProcessLinkAdd(IFMapNode *lnode, IFMapNode *rnode, const BitSet &bset)
bool FilterNeighbor(IFMapNode *lnode, IFMapLink *link)
std::map< std::string, DBGraph::VisitorFilter::AllowedEdgeSet > VertexEdgeMap
Definition: ifmap_util.h:14
DB * database()
Definition: ifmap_server.h:82
static const size_t npos
Definition: bitset.h:19
IFMapNodeState * NodeStateLookup(IFMapNode *node)
void Visit(DBGraphVertex *start, VertexVisitor vertex_visit_fn, EdgeVisitor edge_visit_fn)
Definition: db_graph.cc:111
void StateInterestOr(IFMapState *state, const BitSet &interest_bits)
ConfigSet::const_iterator Cs_citer
void LinkAdd(IFMapLink *link, IFMapNode *lnode, const BitSet &lhs, IFMapNode *rnode, const BitSet &rhs)
iterator end()
Definition: ifmap_update.h:188
const IFMapNodeState * NodeStateLookup(const IFMapNode *node) const
IFMapExporter * exporter_
std::pair< bool, AllowedEdgeSet > AllowedEdgeRetVal
Definition: db_graph.h:30
void DeleteNewReachableNodesTracker(int client_index)
bool IsNode() const
Definition: ifmap_update.h:159
IFMapGraphWalker(DBGraph *graph, IFMapExporter *exporter)
void LinkDeleteWalkBatchEnd(const BitSet &done_set)
std::set< IFMapState * > ReachableNodesSet
IFMapNode * GetIFMapNode() const
void Set(const BitSet &rhs)
Definition: bitset.cc:462
Definition: bitset.h:17
BitSet & set(size_t pos)
Definition: bitset.cc:125
size_t find_first() const
Definition: bitset.cc:242
static IFMapTable * FindTable(DB *db, const std::string &element_type)
Definition: ifmap_table.cc:39
void LinkRemove(const BitSet &bset)
void BuildComplement(const BitSet &lhs, const BitSet &rhs)
Definition: bitset.cc:486
size_t find_next(size_t pos) const
Definition: bitset.cc:255
virtual AllowedEdgeRetVal AllowedEdges(const DBGraphVertex *source) const
Definition: ifmap_util.cc:55
virtual bool VertexFilter(const DBGraphVertex *vertex) const
Definition: ifmap_util.cc:46
void nmask_clear()
Definition: ifmap_update.h:194
bool VertexFilter(const DBGraphVertex *vertex) const
virtual std::string ToString() const =0
ReachableNodesSet::const_iterator Rns_citer
void OrLinkDeleteClients(const BitSet &bset)
IFMapExporter * exporter_