OpenSDN source code
IFMapExporter Class Reference

#include <ifmap_exporter.h>

Collaboration diagram for IFMapExporter:

Classes

class  TableInfo
 

Public Types

enum  TrackerType { INTEREST , ADVERTISED , TT_END }
 
typedef boost::unordered_set< IFMapState * > ConfigSet
 
typedef ConfigSet::size_type CsSz_t
 
typedef ConfigSet::const_iterator Cs_citer
 
typedef std::vector< ConfigSet * > ClientConfigTracker
 
typedef boost::crc_32_type::value_type crc32type
 

Public Member Functions

 IFMapExporter (IFMapServer *server)
 
 ~IFMapExporter ()
 
void Initialize (DB *db)
 
void Shutdown ()
 
void StateUpdateOnDequeue (IFMapUpdate *update, const BitSet &dequeue_set, bool is_delete)
 
DBTable::ListenerId TableListenerId (const DBTable *table) const
 
IFMapNodeState * NodeStateLocate (IFMapNode *node)
 
IFMapNodeState * NodeStateLookup (IFMapNode *node)
 
IFMapLinkState * LinkStateLookup (IFMapLink *link)
 
DBTable * link_table ()
 
IFMapServer * server ()
 
bool FilterNeighbor (IFMapNode *lnode, IFMapLink *link)
 
void AddClientConfigTracker (int index)
 
void DeleteClientConfigTracker (int index)
 
void UpdateClientConfigTracker (IFMapState *state, const BitSet &client_bits, bool add, TrackerType tracker_type)
 
void CleanupClientConfigTrackedEntries (int index)
 
bool ClientHasConfigTracker (TrackerType tracker_type, int index)
 
bool ClientConfigTrackerHasState (TrackerType tracker_type, int index, IFMapState *state)
 
bool ClientConfigTrackerEmpty (TrackerType tracker_type, int index)
 
size_t ClientConfigTrackerSize (TrackerType tracker_type, int index)
 
Cs_citer ClientConfigTrackerBegin (TrackerType tracker_type, int index) const
 
Cs_citer ClientConfigTrackerEnd (TrackerType tracker_type, int index) const
 
void StateInterestSet (IFMapState *state, const BitSet &interest_bits)
 
void StateInterestOr (IFMapState *state, const BitSet &interest_bits)
 
void StateInterestReset (IFMapState *state, const BitSet &interest_bits)
 
void StateAdvertisedOr (IFMapState *state, const BitSet &interest_bits)
 
void StateAdvertisedReset (IFMapState *state, const BitSet &interest_bits)
 
const IFMapTypenameWhiteList & get_traversal_white_list () const
 
void ResetLinkDeleteClients (const BitSet &bset)
 

Private Types

typedef std::map< DBTable *, TableInfo * > TableMap
 

Private Member Functions

void NodeTableExport (DBTablePartBase *partition, DBEntryBase *entry)
 
void LinkTableExport (DBTablePartBase *partition, DBEntryBase *entry)
 
template<class ObjectType >
bool UpdateAddChange (ObjectType *obj, IFMapState *state, const BitSet &add_set, const BitSet &rm_set, bool change)
 
template<class ObjectType >
bool UpdateRemove (ObjectType *obj, IFMapState *state, const BitSet &rm_set)
 
template<class ObjectType >
void EnqueueDelete (ObjectType *obj, IFMapState *state)
 
void MoveDependentLinks (IFMapNodeState *state)
 
void RemoveDependentLinks (IFMapNodeState *state, const BitSet &rm_set)
 
void MoveAdjacentNode (IFMapNodeState *state)
 
void ProcessAdjacentNode (IFMapNode *node, const BitSet &add_set, IFMapNodeState *state, bool force_process=false)
 
bool IsFeasible (const IFMapNode *node)
 
const BitSet * MergeClientInterest (IFMapNode *node, IFMapNodeState *state, std::unique_ptr< BitSet > *ptr)
 
const TableInfo * Find (const DBTable *table) const
 
void TableStateClear (DBTable *table, DBTable::ListenerId tsid)
 
bool ConfigChanged (IFMapNode *node)
 
void DeleteStateIfAppropriate (DBTable *table, DBEntryBase *entry, IFMapState *state)
 
IFMapUpdateQueue * queue ()
 
IFMapUpdateSender * sender ()
 

Private Attributes

IFMapServer * server_
 
boost::scoped_ptr< IFMapGraphWalker > walker_
 
TableMap table_map_
 
DBTable * link_table_
 
ClientConfigTracker client_config_tracker_ [TT_END]
 

Friends

class XmppIfmapTest
 

Detailed Description

Definition at line 42 of file ifmap_exporter.h.

Member Typedef Documentation

◆ ClientConfigTracker

Definition at line 52 of file ifmap_exporter.h.

◆ ConfigSet

typedef boost::unordered_set<IFMapState *> IFMapExporter::ConfigSet

Definition at line 49 of file ifmap_exporter.h.

◆ crc32type

typedef boost::crc_32_type::value_type IFMapExporter::crc32type

Definition at line 53 of file ifmap_exporter.h.

◆ Cs_citer

typedef ConfigSet::const_iterator IFMapExporter::Cs_citer

Definition at line 51 of file ifmap_exporter.h.

◆ CsSz_t

typedef ConfigSet::size_type IFMapExporter::CsSz_t

Definition at line 50 of file ifmap_exporter.h.

◆ TableMap

typedef std::map<DBTable *, TableInfo *> IFMapExporter::TableMap
private

Definition at line 100 of file ifmap_exporter.h.

Member Enumeration Documentation

◆ TrackerType

Enumerator
INTEREST 
ADVERTISED 
TT_END 

Definition at line 44 of file ifmap_exporter.h.

Constructor & Destructor Documentation

◆ IFMapExporter()

IFMapExporter::IFMapExporter ( IFMapServer *  server)
explicit

Definition at line 40 of file ifmap_exporter.cc.

◆ ~IFMapExporter()

IFMapExporter::~IFMapExporter ( )

Definition at line 44 of file ifmap_exporter.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AddClientConfigTracker()

void IFMapExporter::AddClientConfigTracker ( int  index)

Definition at line 679 of file ifmap_exporter.cc.

◆ CleanupClientConfigTrackedEntries()

void IFMapExporter::CleanupClientConfigTrackedEntries ( int  index)

Definition at line 714 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ ClientConfigTrackerBegin()

IFMapExporter::Cs_citer IFMapExporter::ClientConfigTrackerBegin ( TrackerType  tracker_type,
int  index 
) const

Definition at line 761 of file ifmap_exporter.cc.

◆ ClientConfigTrackerEmpty()

bool IFMapExporter::ClientConfigTrackerEmpty ( TrackerType  tracker_type,
int  index 
)

Definition at line 747 of file ifmap_exporter.cc.

◆ ClientConfigTrackerEnd()

IFMapExporter::Cs_citer IFMapExporter::ClientConfigTrackerEnd ( TrackerType  tracker_type,
int  index 
) const

Definition at line 768 of file ifmap_exporter.cc.

◆ ClientConfigTrackerHasState()

bool IFMapExporter::ClientConfigTrackerHasState ( TrackerType  tracker_type,
int  index,
IFMapState *  state 
)

Definition at line 739 of file ifmap_exporter.cc.

◆ ClientConfigTrackerSize()

size_t IFMapExporter::ClientConfigTrackerSize ( TrackerType  tracker_type,
int  index 
)

Definition at line 754 of file ifmap_exporter.cc.

◆ ClientHasConfigTracker()

bool IFMapExporter::ClientHasConfigTracker ( TrackerType  tracker_type,
int  index 
)

Definition at line 733 of file ifmap_exporter.cc.

◆ ConfigChanged()

bool IFMapExporter::ConfigChanged ( IFMapNode *  node)
private

Definition at line 665 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ DeleteClientConfigTracker()

void IFMapExporter::DeleteClientConfigTracker ( int  index)

Definition at line 690 of file ifmap_exporter.cc.

◆ DeleteStateIfAppropriate()

void IFMapExporter::DeleteStateIfAppropriate ( DBTable *  table,
DBEntryBase *  entry,
IFMapState *  state 
)
private

Definition at line 357 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ EnqueueDelete()

template<class ObjectType >
void IFMapExporter::EnqueueDelete ( ObjectType *  obj,
IFMapState *  state 
)
private

Definition at line 256 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ FilterNeighbor()

bool IFMapExporter::FilterNeighbor ( IFMapNode *  lnode,
IFMapLink *  link 
)

Definition at line 661 of file ifmap_exporter.cc.

◆ Find()

const IFMapExporter::TableInfo * IFMapExporter::Find ( const DBTable *  table) const
private

Definition at line 94 of file ifmap_exporter.cc.

◆ get_traversal_white_list()

const IFMapTypenameWhiteList & IFMapExporter::get_traversal_white_list ( ) const

Definition at line 833 of file ifmap_exporter.cc.

◆ Initialize()

void IFMapExporter::Initialize ( DB *  db)

Definition at line 48 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ IsFeasible()

bool IFMapExporter::IsFeasible ( const IFMapNode *  node)
private

Definition at line 113 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ link_table()

DBTable* IFMapExporter::link_table ( )
inline

Definition at line 70 of file ifmap_exporter.h.

◆ LinkStateLookup()

IFMapLinkState * IFMapExporter::LinkStateLookup ( IFMapLink *  link)

Definition at line 282 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ LinkTableExport()

void IFMapExporter::LinkTableExport ( DBTablePartBase *  partition,
DBEntryBase *  entry 
)
private

Definition at line 451 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ MergeClientInterest()

const BitSet * IFMapExporter::MergeClientInterest ( IFMapNode *  node,
IFMapNodeState *  state,
std::unique_ptr< BitSet > *  ptr 
)
private

Definition at line 120 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ MoveAdjacentNode()

void IFMapExporter::MoveAdjacentNode ( IFMapNodeState *  state)
private

Definition at line 310 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ MoveDependentLinks()

void IFMapExporter::MoveDependentLinks ( IFMapNodeState *  state)
private

Definition at line 291 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ NodeStateLocate()

IFMapNodeState * IFMapExporter::NodeStateLocate ( IFMapNode *  node)

Definition at line 148 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ NodeStateLookup()

IFMapNodeState * IFMapExporter::NodeStateLookup ( IFMapNode *  node)

Definition at line 141 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ NodeTableExport()

void IFMapExporter::NodeTableExport ( DBTablePartBase *  partition,
DBEntryBase *  entry 
)
private

Definition at line 381 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ ProcessAdjacentNode()

void IFMapExporter::ProcessAdjacentNode ( IFMapNode *  node,
const BitSet &  add_set,
IFMapNodeState *  state,
bool  force_process = false 
)
private

Definition at line 337 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ queue()

IFMapUpdateQueue * IFMapExporter::queue ( )
private

Definition at line 159 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ RemoveDependentLinks()

void IFMapExporter::RemoveDependentLinks ( IFMapNodeState *  state,
const BitSet &  rm_set 
)
private

Definition at line 320 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ ResetLinkDeleteClients()

void IFMapExporter::ResetLinkDeleteClients ( const BitSet &  bset)

Definition at line 837 of file ifmap_exporter.cc.

◆ sender()

IFMapUpdateSender * IFMapExporter::sender ( )
private

Definition at line 163 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ server()

IFMapServer* IFMapExporter::server ( )
inline

Definition at line 71 of file ifmap_exporter.h.

◆ Shutdown()

void IFMapExporter::Shutdown ( )

Definition at line 72 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ StateAdvertisedOr()

void IFMapExporter::StateAdvertisedOr ( IFMapState *  state,
const BitSet &  interest_bits 
)

Definition at line 817 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ StateAdvertisedReset()

void IFMapExporter::StateAdvertisedReset ( IFMapState *  state,
const BitSet &  interest_bits 
)

Definition at line 826 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ StateInterestOr()

void IFMapExporter::StateInterestOr ( IFMapState *  state,
const BitSet &  interest_bits 
)

Definition at line 800 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ StateInterestReset()

void IFMapExporter::StateInterestReset ( IFMapState *  state,
const BitSet &  interest_bits 
)

Definition at line 809 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ StateInterestSet()

void IFMapExporter::StateInterestSet ( IFMapState *  state,
const BitSet &  interest_bits 
)

Definition at line 775 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ StateUpdateOnDequeue()

void IFMapExporter::StateUpdateOnDequeue ( IFMapUpdate *  update,
const BitSet &  dequeue_set,
bool  is_delete 
)

Definition at line 593 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ TableListenerId()

DBTableBase::ListenerId IFMapExporter::TableListenerId ( const DBTable *  table) const

Definition at line 104 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ TableStateClear()

void IFMapExporter::TableStateClear ( DBTable *  table,
DBTable::ListenerId  tsid 
)
private

Definition at line 640 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ UpdateAddChange()

template<class ObjectType >
bool IFMapExporter::UpdateAddChange ( ObjectType *  obj,
IFMapState *  state,
const BitSet &  add_set,
const BitSet &  rm_set,
bool  change 
)
private

Definition at line 168 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ UpdateClientConfigTracker()

void IFMapExporter::UpdateClientConfigTracker ( IFMapState *  state,
const BitSet &  client_bits,
bool  add,
TrackerType  tracker_type 
)

Definition at line 699 of file ifmap_exporter.cc.

Here is the call graph for this function:

◆ UpdateRemove()

template<class ObjectType >
bool IFMapExporter::UpdateRemove ( ObjectType *  obj,
IFMapState *  state,
const BitSet &  rm_set 
)
private

Definition at line 220 of file ifmap_exporter.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ XmppIfmapTest

friend class XmppIfmapTest
friend

Definition at line 98 of file ifmap_exporter.h.

Member Data Documentation

◆ client_config_tracker_

ClientConfigTracker IFMapExporter::client_config_tracker_[TT_END]
private

Definition at line 143 of file ifmap_exporter.h.

◆ link_table_

DBTable* IFMapExporter::link_table_
private

Definition at line 142 of file ifmap_exporter.h.

◆ server_

IFMapServer* IFMapExporter::server_
private

Definition at line 138 of file ifmap_exporter.h.

◆ table_map_

TableMap IFMapExporter::table_map_
private

Definition at line 140 of file ifmap_exporter.h.

◆ walker_

boost::scoped_ptr<IFMapGraphWalker> IFMapExporter::walker_
private

Definition at line 139 of file ifmap_exporter.h.


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