OpenSDN source code
|
#include <cfg_listener.h>
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) |
AgentDBTable * | GetLinkOperDBTable (IFMapNode *node) |
AgentDBTable * | GetOperDBTable (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) |
IFMapNode * | FindAdjacentIFMapNode (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) |
CfgDBState * | GetCfgDBState (IFMapTable *table, DBEntryBase *dbe, DBTableBase::ListenerId &id) |
void | NodeNotify (AgentDBTable *oper_table, IFMapNode *node) |
DISALLOW_COPY_AND_ASSIGN (CfgListener) | |
Private Attributes | |
DB * | database_ |
CfgListenerIdMap | cfg_listener_id_map_ |
CfgListenerMap | cfg_listener_map_ |
CfgListenerMap | cfg_link_listener_map_ |
CfgListenerCbMap | cfg_listener_cb_map_ |
Definition at line 21 of file cfg_listener.h.
typedef std::map<std::string, CfgListenerInfo> CfgListener::CfgListenerCbMap |
Definition at line 44 of file cfg_listener.h.
typedef std::map<DBTableBase *, DBTableBase::ListenerId> CfgListener::CfgListenerIdMap |
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.
CfgListener::CfgListener | ( | DB * | database | ) |
|
inlinevirtual |
Definition at line 24 of file cfg_listener.h.
bool CfgListener::CanUseNode | ( | IFMapNode * | node | ) |
bool CfgListener::CanUseNode | ( | IFMapNode * | node, |
IFMapAgentTable * | table | ||
) |
|
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 | ) |
|
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 | ||
) |
|
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 | ||
) |
|
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 | ) |
|
private |
|
private |
Definition at line 99 of file cfg_listener.h.
|
private |
Definition at line 100 of file cfg_listener.h.
|
private |
Definition at line 97 of file cfg_listener.h.
|
private |
Definition at line 98 of file cfg_listener.h.
|
private |
Definition at line 95 of file cfg_listener.h.