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

#include <cfg_listener.h>

Collaboration diagram for CfgListener:

Classes

struct  CfgListenerInfo
 
struct  CfgTableListenerInfo
 

Public Types

typedef boost::function< void(IFMapNode *)> NodeListenerCb
 
typedef std::map< DBTableBase
*, DBTableBase::ListenerId
CfgListenerIdMap
 
typedef std::map< std::string,
CfgTableListenerInfo
CfgListenerMap
 
typedef std::map< std::string,
CfgListenerInfo
CfgListenerCbMap
 
typedef boost::function< void(const
Agent *agent, const char *name,
IFMapNode *node, AgentKey *key,
AgentData *data)> 
IFMapNodeCb
 

Public Member Functions

 CfgListener (DB *database)
 
virtual ~CfgListener ()
 
void NodeListener (DBTablePartBase *partition, DBEntryBase *dbe)
 
void LinkListener (DBTablePartBase *partition, DBEntryBase *dbe)
 
void NodeCallback (DBTablePartBase *partition, DBEntryBase *dbe)
 
void LinkRegister (const std::string &link_mdata, AgentDBTable *table)
 
void Register (const std::string &id_type, AgentDBTable *table, int need_property_id)
 
void Register (const std::string &id_type, NodeListenerCb callback, int need_property_id)
 
void Unregister (std::string type)
 
AgentDBTableGetLinkOperDBTable (IFMapNode *node)
 
AgentDBTableGetOperDBTable (IFMapNode *node)
 
NodeListenerCb GetCallback (IFMapNode *node)
 
void NodeReSync (IFMapNode *node)
 
void Init ()
 
void Shutdown ()
 
bool CanUseNode (IFMapNode *node)
 
bool CanUseNode (IFMapNode *node, IFMapAgentTable *table)
 
bool SkipNode (IFMapNode *node)
 
bool SkipNode (IFMapNode *node, IFMapAgentTable *table)
 
bool GetCfgDBStateUuid (IFMapNode *node, boost::uuids::uuid &id)
 
uint32_t ForEachAdjacentIFMapNode (const Agent *agent, IFMapNode *node, const char *name, AgentKey *key, AgentData *data, IFMapNodeCb cb)
 
IFMapNodeFindAdjacentIFMapNode (const Agent *agent, IFMapNode *node, const char *name)
 

Private Member Functions

void UpdateSeenState (DBTableBase *table, DBEntryBase *dbe, CfgDBState *state, DBTableBase::ListenerId id)
 
void LinkNotify (IFMapLink *link, IFMapNode *node, IFMapNode *peer, const std::string &peer_type, CfgDBState *state, DBTableBase::ListenerId id)
 
CfgDBStateGetCfgDBState (IFMapTable *table, DBEntryBase *dbe, DBTableBase::ListenerId &id)
 
void NodeNotify (AgentDBTable *oper_table, IFMapNode *node)
 
 DISALLOW_COPY_AND_ASSIGN (CfgListener)
 

Private Attributes

DBdatabase_
 
CfgListenerIdMap cfg_listener_id_map_
 
CfgListenerMap cfg_listener_map_
 
CfgListenerMap cfg_link_listener_map_
 
CfgListenerCbMap cfg_listener_cb_map_
 

Detailed Description

Definition at line 21 of file cfg_listener.h.

Member Typedef Documentation

typedef std::map<std::string, CfgListenerInfo> CfgListener::CfgListenerCbMap

Definition at line 44 of file cfg_listener.h.

Definition at line 40 of file cfg_listener.h.

typedef std::map<std::string, CfgTableListenerInfo> CfgListener::CfgListenerMap

Definition at line 42 of file cfg_listener.h.

typedef boost::function<void(const Agent *agent, const char *name, IFMapNode *node, AgentKey *key, AgentData *data)> CfgListener::IFMapNodeCb

Definition at line 77 of file cfg_listener.h.

typedef boost::function<void(IFMapNode *)> CfgListener::NodeListenerCb

Definition at line 33 of file cfg_listener.h.

Constructor & Destructor Documentation

CfgListener::CfgListener ( DB database)
virtual CfgListener::~CfgListener ( )
inlinevirtual

Definition at line 24 of file cfg_listener.h.

Member Function Documentation

bool CfgListener::CanUseNode ( IFMapNode node)
bool CfgListener::CanUseNode ( IFMapNode node,
IFMapAgentTable table 
)
CfgListener::DISALLOW_COPY_AND_ASSIGN ( CfgListener  )
private
IFMapNode* CfgListener::FindAdjacentIFMapNode ( const Agent agent,
IFMapNode node,
const char *  name 
)
uint32_t CfgListener::ForEachAdjacentIFMapNode ( const Agent agent,
IFMapNode node,
const char *  name,
AgentKey key,
AgentData data,
IFMapNodeCb  cb 
)
NodeListenerCb CfgListener::GetCallback ( IFMapNode node)
CfgDBState* CfgListener::GetCfgDBState ( IFMapTable table,
DBEntryBase dbe,
DBTableBase::ListenerId id 
)
private
bool CfgListener::GetCfgDBStateUuid ( IFMapNode node,
boost::uuids::uuid id 
)
AgentDBTable* CfgListener::GetLinkOperDBTable ( IFMapNode node)
AgentDBTable* CfgListener::GetOperDBTable ( IFMapNode node)
void CfgListener::Init ( )
void CfgListener::LinkListener ( DBTablePartBase partition,
DBEntryBase dbe 
)
void CfgListener::LinkNotify ( IFMapLink link,
IFMapNode node,
IFMapNode peer,
const std::string &  peer_type,
CfgDBState state,
DBTableBase::ListenerId  id 
)
private
void CfgListener::LinkRegister ( const std::string &  link_mdata,
AgentDBTable table 
)
void CfgListener::NodeCallback ( DBTablePartBase partition,
DBEntryBase dbe 
)
void CfgListener::NodeListener ( DBTablePartBase partition,
DBEntryBase dbe 
)
void CfgListener::NodeNotify ( AgentDBTable oper_table,
IFMapNode node 
)
private
void CfgListener::NodeReSync ( IFMapNode node)
void CfgListener::Register ( const std::string &  id_type,
AgentDBTable table,
int  need_property_id 
)
void CfgListener::Register ( const std::string &  id_type,
NodeListenerCb  callback,
int  need_property_id 
)
void CfgListener::Shutdown ( )
bool CfgListener::SkipNode ( IFMapNode node)
bool CfgListener::SkipNode ( IFMapNode node,
IFMapAgentTable table 
)
void CfgListener::Unregister ( std::string  type)
void CfgListener::UpdateSeenState ( DBTableBase table,
DBEntryBase dbe,
CfgDBState state,
DBTableBase::ListenerId  id 
)
private

Member Data Documentation

CfgListenerMap CfgListener::cfg_link_listener_map_
private

Definition at line 99 of file cfg_listener.h.

CfgListenerCbMap CfgListener::cfg_listener_cb_map_
private

Definition at line 100 of file cfg_listener.h.

CfgListenerIdMap CfgListener::cfg_listener_id_map_
private

Definition at line 97 of file cfg_listener.h.

CfgListenerMap CfgListener::cfg_listener_map_
private

Definition at line 98 of file cfg_listener.h.

DB* CfgListener::database_
private

Definition at line 95 of file cfg_listener.h.


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