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

#include <ifmap_server_table.h>

Inheritance diagram for IFMapServerTable:
Collaboration diagram for IFMapServerTable:

Classes

struct  RequestData
 

Public Member Functions

 IFMapServerTable (DB *db, const std::string &name, DBGraph *graph)
 
virtual std::unique_ptr< DBEntryAllocEntry (const DBRequestKey *key) const
 
virtual void Input (DBTablePartition *partition, DBClient *client, DBRequest *req)
 
virtual void Clear ()
 
bool DeleteIfEmpty (IFMapNode *node)
 
void Notify (IFMapNode *node)
 
void IFMapVmSubscribe (const std::string &vr_name, const std::string &vm_name, bool subscribe, bool has_vms)
 
void IFMapAddVrVmLink (IFMapNode *vr_node, IFMapNode *vm_node)
 
void IFMapRemoveVrVmLink (IFMapNode *vr_node, IFMapNode *vm_node)
 
- Public Member Functions inherited from IFMapTable
 IFMapTable (DB *db, const std::string &name, DBGraph *graph)
 
virtual int PartitionCount () const
 
virtual const char * Typename () const =0
 
virtual IFMapObjectAllocObject ()=0
 
IFMapNodeFindNode (const std::string &name)
 
IFMapNodeFindNextNode (const std::string &name)
 
- Public Member Functions inherited from DBGraphTable
 DBGraphTable (DB *db, const std::string &name, DBGraph *graph)
 
const DBGraphgraph () const
 
DBGraphgraph ()
 
- Public Member Functions inherited from DBTable
 DBTable (DB *db, const std::string &name)
 
virtual ~DBTable ()
 
void Init ()
 
virtual size_t Hash (const DBEntry *entry) const
 
virtual size_t Hash (const DBRequestKey *key) const
 
virtual DBTablePartitionAllocPartition (int index)
 
virtual DBEntryAdd (const DBRequest *req)
 
virtual bool OnChange (DBEntry *entry, const DBRequest *req)
 
virtual bool Delete (DBEntry *entry, const DBRequest *req)
 
void NotifyAllEntries ()
 
DBEntryFind (const DBEntry *entry)
 
const DBEntryFind (const DBEntry *entry) const
 
DBEntryFind (const DBRequestKey *key, int id=-1)
 
const DBEntryFind (const DBRequestKey *key, int id=-1) const
 
DBEntryFindNoLock (const DBEntry *entry)
 
DBEntryFindNoLock (const DBRequestKey *key)
 
virtual DBTablePartBaseGetTablePartition (const DBRequestKey *key)
 
virtual const DBTablePartBaseGetTablePartition (const DBRequestKey *key) const
 
virtual DBTablePartBaseGetTablePartition (const DBEntryBase *entry)
 
virtual const DBTablePartBaseGetTablePartition (const DBEntryBase *entry) const
 
virtual DBTablePartBaseGetTablePartition (const int index)
 
virtual const DBTablePartBaseGetTablePartition (const int index) const
 
virtual void Change (DBEntryBase *entry)
 
virtual size_t Size () const
 
DBTableWalkRef AllocWalker (WalkFn walk_fn, WalkCompleteFn walk_complete)
 
void ReleaseWalker (DBTableWalkRef &walk)
 
void WalkTable (DBTableWalkRef walk)
 
void WalkAgain (DBTableWalkRef walk)
 
void SetWalkIterationToYield (int count)
 
int GetWalkIterationToYield ()
 
void SetWalkTaskId (int task_id)
 
int GetWalkerTaskId ()
 
- Public Member Functions inherited from DBTableBase
 DBTableBase (DB *db, const std::string &name)
 
virtual ~DBTableBase ()
 
bool Enqueue (DBRequest *req)
 
void EnqueueRemove (DBEntryBase *db_entry)
 
virtual void AddRemoveCallback (const DBEntryBase *entry, bool add) const
 
ListenerId Register (ChangeCallback callback, const std::string &name="unspecified")
 
void Unregister (ListenerId listener)
 
void RunNotify (DBTablePartBase *tpart, DBEntryBase *entry)
 
void AddToDBStateCount (ListenerId listener, int count)
 
uint64_t GetDBStateCount (ListenerId listener)
 
bool empty () const
 
virtual void RetryDelete ()
 
virtual bool MayDelete () const
 
DBdatabase ()
 
const DBdatabase () const
 
const std::string & name () const
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void FillListeners (std::vector< ShowTableListener > *listeners) const
 
uint64_t enqueue_count () const
 
void incr_enqueue_count ()
 
void reset_enqueue_count ()
 
uint64_t input_count () const
 
void incr_input_count ()
 
void reset_input_count ()
 
uint64_t notify_count () const
 
void incr_notify_count ()
 
void reset_notify_count ()
 
bool HasWalkers () const
 
uint64_t walker_count () const
 
void incr_walker_count ()
 
uint64_t decr_walker_count ()
 
uint64_t walk_request_count () const
 
uint64_t walk_complete_count () const
 
uint64_t walk_cancel_count () const
 
uint64_t walk_again_count () const
 
uint64_t walk_count () const
 
void incr_walk_request_count ()
 
void incr_walk_complete_count ()
 
void incr_walk_cancel_count ()
 
void incr_walk_again_count ()
 
void incr_walk_count ()
 

Static Public Member Functions

static std::string LinkAttrKey (IFMapNode *first, IFMapNode *second)
 
static void RemoveObjectAndDeleteNode (IFMapNode *node, const IFMapOrigin &origin)
 
- Static Public Member Functions inherited from IFMapTable
static IFMapTableFindTable (DB *db, const std::string &element_type)
 
static void ClearTables (DB *db)
 
static void FillNodeTableList (DB *db, std::vector< IFMapNodeTableListShowEntry > *table_list)
 
- Static Public Member Functions inherited from DBTable
static void DBStateClear (DBTable *table, ListenerId id)
 

Private Member Functions

IFMapNodeEntryLocate (RequestKey *key, bool *changep)
 
IFMapNodeEntryLookup (RequestKey *key)
 
IFMapObjectLocateObject (IFMapNode *node, IFMapOrigin origin)
 
IFMapIdentifierLocateIdentifier (IFMapNode *node, IFMapOrigin origin, uint64_t sequence_number)
 
IFMapLinkAttrLocateLinkAttr (IFMapNode *node, IFMapOrigin origin, uint64_t sequence_number)
 
void DeleteNode (IFMapNode *node)
 
IFMapLinkLinkNodeAdd (IFMapNode *first, IFMapNode *second, const std::string &metadata, uint64_t sequence_number, const IFMapOrigin &origin)
 
IFMapLinkFindLinkNode (IFMapNode *first, IFMapNode *second, const std::string &metadata)
 
void LinkNodeDelete (IFMapLink *link, const IFMapOrigin &origin)
 
void LinkNodeUpdate (IFMapLink *link, uint64_t sequence_number, const IFMapOrigin &origin)
 
void IFMapProcVmSubscribe (const std::string &vr_name, const std::string &vm_name)
 
void IFMapProcVmUnsubscribe (const std::string &vr_name, const std::string &vm_name, bool has_vms)
 

Static Private Member Functions

static IFMapNodeTableEntryLookup (IFMapServerTable *table, const std::string &id_name)
 
static IFMapNodeTableEntryLocate (IFMapServerTable *table, const std::string &id_name, bool *changep)
 

Additional Inherited Members

- Public Types inherited from DBTable
typedef boost::intrusive_ptr
< DBTableWalk
DBTableWalkRef
 
typedef boost::function< bool(DBTablePartBase
*, DBEntryBase *)> 
WalkFn
 
typedef boost::function< void(DBTableWalkRef,
DBTableBase *)> 
WalkCompleteFn
 
- Public Types inherited from DBTableBase
typedef boost::function< void(DBTablePartBase
*, DBEntryBase *)> 
ChangeCallback
 
typedef int ListenerId
 
- Static Public Attributes inherited from IFMapTable
static const int kPartitionCount = 1
 
- Static Public Attributes inherited from DBTable
static const int kIterationToYield = 256
 
- Static Public Attributes inherited from DBTableBase
static const int kInvalidId = -1
 

Detailed Description

Definition at line 20 of file ifmap_server_table.h.

Constructor & Destructor Documentation

IFMapServerTable::IFMapServerTable ( DB db,
const std::string &  name,
DBGraph graph 
)

Definition at line 47 of file ifmap_server_table.cc.

Member Function Documentation

unique_ptr< DBEntry > IFMapServerTable::AllocEntry ( const DBRequestKey key) const
virtual

Implements DBTable.

Definition at line 51 of file ifmap_server_table.cc.

void IFMapServerTable::Clear ( )
virtual

Implements IFMapTable.

Definition at line 403 of file ifmap_server_table.cc.

Here is the call graph for this function:

bool IFMapServerTable::DeleteIfEmpty ( IFMapNode node)

Definition at line 177 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::DeleteNode ( IFMapNode node)
private

Definition at line 163 of file ifmap_server_table.cc.

Here is the call graph for this function:

IFMapNode * IFMapServerTable::EntryLocate ( RequestKey key,
bool *  changep 
)
private

Definition at line 76 of file ifmap_server_table.cc.

Here is the call graph for this function:

IFMapNode * IFMapServerTable::EntryLookup ( RequestKey key)
private

Definition at line 67 of file ifmap_server_table.cc.

Here is the call graph for this function:

IFMapLink * IFMapServerTable::FindLinkNode ( IFMapNode first,
IFMapNode second,
const std::string &  metadata 
)
private

Definition at line 114 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::IFMapAddVrVmLink ( IFMapNode vr_node,
IFMapNode vm_node 
)

Definition at line 431 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::IFMapProcVmSubscribe ( const std::string &  vr_name,
const std::string &  vm_name 
)
private

Definition at line 449 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::IFMapProcVmUnsubscribe ( const std::string &  vr_name,
const std::string &  vm_name,
bool  has_vms 
)
private

Definition at line 484 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::IFMapRemoveVrVmLink ( IFMapNode vr_node,
IFMapNode vm_node 
)

Definition at line 474 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::IFMapVmSubscribe ( const std::string &  vr_name,
const std::string &  vm_name,
bool  subscribe,
bool  has_vms 
)

Definition at line 421 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::Input ( DBTablePartition partition,
DBClient client,
DBRequest req 
)
virtual

Reimplemented from DBTable.

Definition at line 223 of file ifmap_server_table.cc.

Here is the call graph for this function:

std::string IFMapServerTable::LinkAttrKey ( IFMapNode first,
IFMapNode second 
)
static

Definition at line 151 of file ifmap_server_table.cc.

Here is the call graph for this function:

IFMapLink * IFMapServerTable::LinkNodeAdd ( IFMapNode first,
IFMapNode second,
const std::string &  metadata,
uint64_t  sequence_number,
const IFMapOrigin origin 
)
private

Definition at line 123 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::LinkNodeDelete ( IFMapLink link,
const IFMapOrigin origin 
)
private

Definition at line 140 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::LinkNodeUpdate ( IFMapLink link,
uint64_t  sequence_number,
const IFMapOrigin origin 
)
private

Definition at line 134 of file ifmap_server_table.cc.

Here is the call graph for this function:

IFMapIdentifier * IFMapServerTable::LocateIdentifier ( IFMapNode node,
IFMapOrigin  origin,
uint64_t  sequence_number 
)
private

Definition at line 196 of file ifmap_server_table.cc.

Here is the call graph for this function:

IFMapLinkAttr * IFMapServerTable::LocateLinkAttr ( IFMapNode node,
IFMapOrigin  origin,
uint64_t  sequence_number 
)
private

Definition at line 213 of file ifmap_server_table.cc.

Here is the call graph for this function:

IFMapObject * IFMapServerTable::LocateObject ( IFMapNode node,
IFMapOrigin  origin 
)
private

Definition at line 185 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::Notify ( IFMapNode node)

Definition at line 171 of file ifmap_server_table.cc.

Here is the call graph for this function:

void IFMapServerTable::RemoveObjectAndDeleteNode ( IFMapNode node,
const IFMapOrigin origin 
)
static

Definition at line 512 of file ifmap_server_table.cc.

Here is the call graph for this function:

IFMapNode * IFMapServerTable::TableEntryLocate ( IFMapServerTable table,
const std::string &  id_name,
bool *  changep 
)
staticprivate

Definition at line 106 of file ifmap_server_table.cc.

Here is the call graph for this function:

IFMapNode * IFMapServerTable::TableEntryLookup ( IFMapServerTable table,
const std::string &  id_name 
)
staticprivate

Definition at line 99 of file ifmap_server_table.cc.

Here is the call graph for this function:


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