OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AgentRouteWalker Class Reference

#include <agent_route_walker.h>

Inheritance diagram for AgentRouteWalker:
Collaboration diagram for AgentRouteWalker:

Public Types

typedef boost::function< void()> WalkDone
 
typedef boost::function< void(VrfEntry *)> RouteWalkDoneCb
 
typedef std::map< const
VrfEntry *, tbb::atomic< int > > 
VrfRouteWalkCountMap
 

Public Member Functions

virtual ~AgentRouteWalker ()
 
void StartVrfWalk ()
 
void StartRouteWalk (VrfEntry *vrf)
 
virtual bool VrfWalkNotify (DBTablePartBase *partition, DBEntryBase *e)
 
virtual bool RouteWalkNotify (DBTablePartBase *partition, DBEntryBase *e)
 
virtual void VrfWalkDone (DBTableBase *part)
 
virtual void RouteWalkDone (DBTableBase *part)
 
void WalkDoneCallback (WalkDone cb)
 
void RouteWalkDoneForVrfCallback (RouteWalkDoneCb cb)
 
int walk_count () const
 
bool IsWalkCompleted () const
 
bool IsValidDeleteWalkRef () const
 
bool IsValidVrfWalkRef () const
 
bool IsDeregisterDone () const
 
bool AreAllWalksDone () const
 
bool AreAllRouteWalksDone (const VrfEntry *vrf) const
 
bool IsRouteTableWalkCompleted (RouteWalkerDBState *state)
 
AgentRouteWalkerManagermgr ()
 
Agentagent () const
 
uint32_t refcount () const
 

Static Public Attributes

static const int kInvalidWalkCount = 0
 

Protected Member Functions

 AgentRouteWalker (const std::string &name, Agent *agent)
 
void set_mgr (AgentRouteWalkerManager *mgr)
 

Private Member Functions

void Callback (VrfEntry *vrf)
 
void OnRouteTableWalkCompleteForVrf (VrfEntry *vrf)
 
void DecrementWalkCount ()
 
void DecrementRouteWalkCount (const VrfEntry *vrf)
 
void IncrementWalkCount ()
 
void IncrementRouteWalkCount (const VrfEntry *vrf)
 
void WalkTable (AgentRouteTable *table, DBTable::DBTableWalkRef &route_table_walk_ref)
 
DBTable::DBTableWalkRef AllocateRouteTableReferences (AgentRouteTable *table)
 
void VrfWalkDoneInternal (DBTableBase *part)
 
void RouteWalkDoneInternal (DBTableBase *part, AgentRouteWalkerPtr ptr)
 
DBTable::DBTableWalkRef LocateRouteTableWalkRef (const VrfEntry *vrf, RouteWalkerDBState *state, AgentRouteTable *table)
 
RouteWalkerDBStateLocateRouteWalkerDBState (VrfEntry *vrf)
 
DBTable::DBTableWalkRefvrf_walk_ref ()
 
DBTable::DBTableWalkRefdelete_walk_ref ()
 
void ReleaseVrfWalkReference ()
 
bool Deregister (DBTablePartBase *partition, DBEntryBase *e)
 
 DISALLOW_COPY_AND_ASSIGN (AgentRouteWalker)
 

Static Private Member Functions

static void DeregisterDone (AgentRouteWalkerPtr walker)
 

Private Attributes

Agentagent_
 
std::string name_
 
VrfRouteWalkCountMap route_walk_count_
 
tbb::atomic< int > walk_count_
 
WalkDone walk_done_cb_
 
RouteWalkDoneCb route_walk_done_for_vrf_cb_
 
DBTable::DBTableWalkRef vrf_walk_ref_
 
AgentRouteWalkerManagermgr_
 
bool deregister_done_
 
DBTable::DBTableWalkRef delete_walk_ref_
 
tbb::atomic< uint32_t > refcount_
 

Friends

class AgentRouteWalkerManager
 
void intrusive_ptr_add_ref (AgentRouteWalker *w)
 
void intrusive_ptr_release (AgentRouteWalker *w)
 

Detailed Description

Definition at line 92 of file agent_route_walker.h.

Member Typedef Documentation

typedef boost::function<void(VrfEntry *)> AgentRouteWalker::RouteWalkDoneCb

Definition at line 96 of file agent_route_walker.h.

typedef std::map<const VrfEntry *, tbb::atomic<int> > AgentRouteWalker::VrfRouteWalkCountMap

Definition at line 97 of file agent_route_walker.h.

typedef boost::function<void()> AgentRouteWalker::WalkDone

Definition at line 95 of file agent_route_walker.h.

Constructor & Destructor Documentation

AgentRouteWalker::~AgentRouteWalker ( )
virtual

Definition at line 139 of file agent_route_walker.cc.

AgentRouteWalker::AgentRouteWalker ( const std::string &  name,
Agent agent 
)
protected

Definition at line 121 of file agent_route_walker.cc.

Here is the call graph for this function:

Member Function Documentation

Agent* AgentRouteWalker::agent ( ) const
inline

Definition at line 129 of file agent_route_walker.h.

DBTable::DBTableWalkRef AgentRouteWalker::AllocateRouteTableReferences ( AgentRouteTable table)
private

Definition at line 211 of file agent_route_walker.cc.

Here is the call graph for this function:

bool AgentRouteWalker::AreAllRouteWalksDone ( const VrfEntry vrf) const

Definition at line 386 of file agent_route_walker.cc.

bool AgentRouteWalker::AreAllWalksDone ( ) const

Definition at line 382 of file agent_route_walker.cc.

void AgentRouteWalker::Callback ( VrfEntry vrf)
private

Definition at line 330 of file agent_route_walker.cc.

Here is the call graph for this function:

void AgentRouteWalker::DecrementRouteWalkCount ( const VrfEntry vrf)
private

Definition at line 317 of file agent_route_walker.cc.

void AgentRouteWalker::DecrementWalkCount ( )
private

Definition at line 312 of file agent_route_walker.cc.

DBTable::DBTableWalkRef& AgentRouteWalker::delete_walk_ref ( )
inlineprivate

Definition at line 158 of file agent_route_walker.h.

bool AgentRouteWalker::Deregister ( DBTablePartBase partition,
DBEntryBase e 
)
private

Definition at line 412 of file agent_route_walker.cc.

Here is the call graph for this function:

void AgentRouteWalker::DeregisterDone ( AgentRouteWalkerPtr  walker)
staticprivate

Definition at line 445 of file agent_route_walker.cc.

Here is the call graph for this function:

AgentRouteWalker::DISALLOW_COPY_AND_ASSIGN ( AgentRouteWalker  )
private
void AgentRouteWalker::IncrementRouteWalkCount ( const VrfEntry vrf)
private

Definition at line 326 of file agent_route_walker.cc.

void AgentRouteWalker::IncrementWalkCount ( )
inlineprivate

Definition at line 144 of file agent_route_walker.h.

bool AgentRouteWalker::IsDeregisterDone ( ) const
inline

Definition at line 124 of file agent_route_walker.h.

bool AgentRouteWalker::IsRouteTableWalkCompleted ( RouteWalkerDBState state)

Definition at line 348 of file agent_route_walker.cc.

bool AgentRouteWalker::IsValidDeleteWalkRef ( ) const
inline

Definition at line 118 of file agent_route_walker.h.

bool AgentRouteWalker::IsValidVrfWalkRef ( ) const
inline

Definition at line 121 of file agent_route_walker.h.

bool AgentRouteWalker::IsWalkCompleted ( ) const
inline

Definition at line 117 of file agent_route_walker.h.

DBTable::DBTableWalkRef AgentRouteWalker::LocateRouteTableWalkRef ( const VrfEntry vrf,
RouteWalkerDBState state,
AgentRouteTable table 
)
private

Definition at line 159 of file agent_route_walker.cc.

Here is the call graph for this function:

RouteWalkerDBState * AgentRouteWalker::LocateRouteWalkerDBState ( VrfEntry vrf)
private

Definition at line 145 of file agent_route_walker.cc.

Here is the call graph for this function:

AgentRouteWalkerManager* AgentRouteWalker::mgr ( )
inline

Definition at line 128 of file agent_route_walker.h.

void AgentRouteWalker::OnRouteTableWalkCompleteForVrf ( VrfEntry vrf)
private

Definition at line 365 of file agent_route_walker.cc.

Here is the call graph for this function:

uint32_t AgentRouteWalker::refcount ( ) const
inline

Definition at line 130 of file agent_route_walker.h.

void AgentRouteWalker::ReleaseVrfWalkReference ( )
private

Definition at line 404 of file agent_route_walker.cc.

Here is the call graph for this function:

void AgentRouteWalker::RouteWalkDone ( DBTableBase part)
virtual

Definition at line 291 of file agent_route_walker.cc.

void AgentRouteWalker::RouteWalkDoneForVrfCallback ( RouteWalkDoneCb  cb)

Definition at line 400 of file agent_route_walker.cc.

void AgentRouteWalker::RouteWalkDoneInternal ( DBTableBase part,
AgentRouteWalkerPtr  ptr 
)
private

Definition at line 294 of file agent_route_walker.cc.

Here is the call graph for this function:

bool AgentRouteWalker::RouteWalkNotify ( DBTablePartBase partition,
DBEntryBase e 
)
virtual
void AgentRouteWalker::set_mgr ( AgentRouteWalkerManager mgr)
inlineprotected

Definition at line 137 of file agent_route_walker.h.

Here is the call graph for this function:

void AgentRouteWalker::StartRouteWalk ( VrfEntry vrf)

Definition at line 229 of file agent_route_walker.cc.

Here is the call graph for this function:

void AgentRouteWalker::StartVrfWalk ( )

Definition at line 200 of file agent_route_walker.cc.

Here is the call graph for this function:

DBTable::DBTableWalkRef& AgentRouteWalker::vrf_walk_ref ( )
inlineprivate

Definition at line 155 of file agent_route_walker.h.

void AgentRouteWalker::VrfWalkDone ( DBTableBase part)
virtual

Definition at line 280 of file agent_route_walker.cc.

void AgentRouteWalker::VrfWalkDoneInternal ( DBTableBase part)
private

Definition at line 274 of file agent_route_walker.cc.

Here is the call graph for this function:

bool AgentRouteWalker::VrfWalkNotify ( DBTablePartBase partition,
DBEntryBase e 
)
virtual

Reimplemented in VrfDeleteWalker, HBFVrfWalker, and ControllerRouteWalker.

Definition at line 249 of file agent_route_walker.cc.

Here is the call graph for this function:

int AgentRouteWalker::walk_count ( ) const
inline

Definition at line 116 of file agent_route_walker.h.

void AgentRouteWalker::WalkDoneCallback ( WalkDone  cb)

Definition at line 392 of file agent_route_walker.cc.

void AgentRouteWalker::WalkTable ( AgentRouteTable table,
DBTable::DBTableWalkRef route_table_walk_ref 
)
private

Definition at line 217 of file agent_route_walker.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class AgentRouteWalkerManager
friend

Definition at line 133 of file agent_route_walker.h.

void intrusive_ptr_add_ref ( AgentRouteWalker w)
friend

Definition at line 463 of file agent_route_walker.cc.

void intrusive_ptr_release ( AgentRouteWalker w)
friend

Definition at line 467 of file agent_route_walker.cc.

Member Data Documentation

Agent* AgentRouteWalker::agent_
private

Definition at line 166 of file agent_route_walker.h.

DBTable::DBTableWalkRef AgentRouteWalker::delete_walk_ref_
private

Definition at line 175 of file agent_route_walker.h.

bool AgentRouteWalker::deregister_done_
private

Definition at line 174 of file agent_route_walker.h.

const int AgentRouteWalker::kInvalidWalkCount = 0
static

Definition at line 94 of file agent_route_walker.h.

AgentRouteWalkerManager* AgentRouteWalker::mgr_
private

Definition at line 173 of file agent_route_walker.h.

std::string AgentRouteWalker::name_
private

Definition at line 167 of file agent_route_walker.h.

tbb::atomic<uint32_t> AgentRouteWalker::refcount_
mutableprivate

Definition at line 176 of file agent_route_walker.h.

VrfRouteWalkCountMap AgentRouteWalker::route_walk_count_
private

Definition at line 168 of file agent_route_walker.h.

RouteWalkDoneCb AgentRouteWalker::route_walk_done_for_vrf_cb_
private

Definition at line 171 of file agent_route_walker.h.

DBTable::DBTableWalkRef AgentRouteWalker::vrf_walk_ref_
private

Definition at line 172 of file agent_route_walker.h.

tbb::atomic<int> AgentRouteWalker::walk_count_
private

Definition at line 169 of file agent_route_walker.h.

WalkDone AgentRouteWalker::walk_done_cb_
private

Definition at line 170 of file agent_route_walker.h.


The documentation for this class was generated from the following files: