5 #ifndef SRC_BGP_ROUTING_INSTANCE_RTARGET_GROUP_MGR_H_
6 #define SRC_BGP_ROUTING_INSTANCE_RTARGET_GROUP_MGR_H_
8 #include <boost/ptr_container/ptr_map.hpp>
9 #include <boost/shared_ptr.hpp>
10 #include <sandesh/sandesh_types.h>
11 #include <sandesh/sandesh.h>
12 #include <sandesh/sandesh_trace.h>
13 #include <tbb/atomic.h>
14 #include <tbb/mutex.h>
71 RTargetList::const_iterator it);
73 RTargetList::const_iterator it);
93 RTargetRoute *rt, RtGroup::InterestedPeerList::const_iterator it);
95 RTargetRoute *rt, RtGroup::InterestedPeerList::iterator it);
114 const std::string ¶m = std::string())
208 typedef boost::ptr_map<const RouteTarget, RtGroup>
RtGroupMap;
friend class BgpXmppRTargetTest
bool IsRTargetRouteOnList(RTargetRoute *rt) const
bool IsRTargetRoutesProcessed() const
void EnableRTargetRouteProcessing()
void DisableRtGroupProcessing()
bool IsRtGroupOnList(RtGroup *rtgroup) const
const_iterator end() const
void RemoveRtGroup(const RouteTarget &rt)
bool IsRouteTargetOnList(const RouteTarget &rtarget) const
virtual ~RTargetGroupMgr()
std::set< RTargetRoute * > RTargetRouteTriggerList
friend class ReplicationTest
void Enqueue(RtGroupMgrReq *req)
void AddRouteTargetToLists(const RouteTarget &rtarget)
boost::scoped_ptr< TaskTrigger > rtarget_route_trigger_
std::set< RouteTarget > RouteTargetTriggerList
std::vector< boost::shared_ptr< TaskTrigger > > rtarget_dep_triggers_
RTargetGroupMgr(BgpServer *server)
virtual void GetRibOutInterestedPeers(RibOut *ribout, const ExtCommunity *ext_community, const RibPeerSet &peerset, RibPeerSet *new_peerset)
RtGroup * LocateRtGroup(const RouteTarget &rt)
DBTableBase::ListenerId GetListenerId(BgpTable *table)
void RTargetDepSync(DBTablePartBase *root, BgpRoute *rt, DBTableBase::ListenerId id, VpnRouteState *dbstate, const VpnRouteState::RTargetList *future)
std::set< RtGroup * > RtGroupRemoveList
bool ProcessRouteTargetList(int part_id)
void DisableRouteTargetProcessing()
void DisableRTargetRouteProcessing()
bool RTargetRouteNotify(DBTablePartBase *root, DBEntryBase *entry)
std::map< BgpTable *, RtGroupMgrTableState * > RtGroupMgrTableStateList
RtGroupMgrTableStateList table_state_
bool ProcessRtGroupList()
void NotifyRtGroup(const RouteTarget &rt)
RtGroupMap::const_iterator const_iterator
void NotifyRtGroupUnlocked(const RouteTarget &rt)
void BuildRTargetDistributionGraph(BgpTable *table, RTargetRoute *rt, DBTableBase::ListenerId id)
boost::scoped_ptr< TaskTrigger > remove_rtgroup_trigger_
RtGroupRemoveList rtgroup_remove_list_
void EnableRtGroupProcessing()
bool VpnRouteNotify(DBTablePartBase *root, DBEntryBase *entry)
std::vector< RouteTargetTriggerList > rtarget_trigger_lists_
bool RequestHandler(RtGroupMgrReq *req)
RTargetRouteTriggerList rtarget_route_list_
LifetimeRef< RTargetGroupMgr > master_instance_delete_ref_
bool ProcessRTargetRouteList()
const_iterator begin() const
void EnableRouteTargetProcessing()
void RTargetPeerSync(BgpTable *table, RTargetRoute *rt, DBTableBase::ListenerId id, RTargetState *dbstate, const RtGroup::InterestedPeerList *future)
RtGroup * GetRtGroup(const RouteTarget &rt)
boost::ptr_map< const RouteTarget, RtGroup > RtGroupMap
const_iterator lower_bound(const RouteTarget &rt) const
DISALLOW_COPY_AND_ASSIGN(RTargetGroupMgr)
RtGroup::InterestedPeerList list_
void AddInterestedPeer(RTargetGroupMgr *mgr, RtGroup *rtgroup, RTargetRoute *rt, RtGroup::InterestedPeerList::const_iterator it)
const RtGroup::InterestedPeerList * GetList() const
void DeleteInterestedPeer(RTargetGroupMgr *mgr, RtGroup *rtgroup, RTargetRoute *rt, RtGroup::InterestedPeerList::iterator it)
RtGroup::InterestedPeerList * GetMutableList()
RtGroupMgrTableState(BgpTable *table, DBTableBase::ListenerId id)
LifetimeRef< RtGroupMgrTableState > table_delete_ref_
DBTableBase::ListenerId GetListenerId() const
DISALLOW_COPY_AND_ASSIGN(RtGroupMgrTableState)
DBTableBase::ListenerId id_
std::map< const BgpPeer *, RTargetRouteList > InterestedPeerList
std::set< RouteTarget > RTargetList
RTargetList * GetMutableList()
void DeleteRouteTarget(RTargetGroupMgr *mgr, int part_id, BgpRoute *rt, RTargetList::const_iterator it)
void AddRouteTarget(RTargetGroupMgr *mgr, int part_id, BgpRoute *rt, RTargetList::const_iterator it)
const RTargetList * GetList() const
DISALLOW_COPY_AND_ASSIGN(RtGroupMgrReq)
SandeshResponse * snh_resp_
RtGroupMgrReq(RequestType type, SandeshResponse *resp, const std::string ¶m=std::string())