5 #ifndef ctrlplane_ifmap_agent_table_h
6 #define ctrlplane_ifmap_agent_table_h
12 #include "boost/asio/io_service.hpp"
15 #include "sandesh/sandesh_trace.h"
17 #define IFMAP_AGENT_LINK_DB_NAME "__ifmap_agentlinkdata__.0"
20 #define IFMAP_AGENT_TRACE(obj, ...) do { \
21 if (LoggingDisabled()) break; \
22 IFMapAgent##obj::TraceMsg(IFMapAgentTraceBuf, __FILE__, __LINE__, ##__VA_ARGS__); \
87 typedef std::map<IFMapTable::RequestKey, std::list<DeferredNode> *,
comp>
LinkDefMap;
95 std::list<DeferredNode>::iterator *list_it);
104 const std::string &metadata, uint64_t seq);
const DBGraph * graph() const
const std::string & name() const
bool operator()(const IFMapTable::RequestKey &left, const IFMapTable::RequestKey &right) const
virtual void Input(DBTablePartition *partition, DBClient *client, DBRequest *req)
std::map< IFMapTable::RequestKey, std::list< DeferredNode > *, comp > LinkDefMap
static DBTable * CreateTable(DB *db, const std::string &name, DBGraph *graph)
const LinkDefMap & GetLinkDefMap() const
IFMapLink * FindLink(IFMapNode *left, IFMapNode *right, const std::string &metadata)
void DestroyDefLink(uint64_t)
bool RemoveDefListEntry(LinkDefMap *map, LinkDefMap::iterator &map_it, std::list< DeferredNode >::iterator *list_it)
void DelLink(IFMapNode *first, IFMapNode *second, DBGraphEdge *edge)
IFMapAgentLinkTable(DB *db, const std::string &name, DBGraph *graph)
void AddLink(IFMapNode *left, IFMapNode *right, const std::string &metadata, uint64_t seq)
void LinkDefAdd(DBRequest *request)
void EvalDefLink(IFMapTable::RequestKey *key)
void IFMapAgentLinkTable_Init(DB *db, DBGraph *graph)
~IFMapAgentStaleCleaner()
bool StaleTimeout(uint64_t)
IFMapAgentStaleCleaner(DB *db, DBGraph *graph)
IFMapNode * EntryLocate(IFMapNode *node, RequestKey *key)
IFMapNode * EntryLookup(RequestKey *key)
boost::function< bool(DBTable *table, IFMapNode *node, DBRequest *req)> PreFilterFn
IFMapAgentTable * TableFind(const std::string &node_name)
virtual std::unique_ptr< DBEntry > AllocEntry(const DBRequestKey *key) const
const DBGraph * GetGraph() const
void NotifyNode(IFMapNode *node)
static IFMapNode * TableEntryLookup(DB *db, RequestKey *key)
void DeleteNode(IFMapNode *node)
void RegisterPreFilter(PreFilterFn fn)
virtual void Input(DBTablePartition *partition, DBClient *client, DBRequest *req)
IFMapAgentTable(DB *db, const std::string &name, DBGraph *graph)
void HandlePendingLinks(IFMapNode *)
void IFMapAgentLinkTable_Init(DB *db, DBGraph *graph)
SandeshTraceBufferPtr IFMapAgentTraceBuf
boost::shared_ptr< TraceBuffer< SandeshTrace > > SandeshTraceBufferPtr
std::string link_metadata
IFMapTable::RequestKey node_key
IFMapTable::RequestKey left_key
IFMapTable::RequestKey right_key
std::unique_ptr< IFMapObject > content