OpenSDN source code
ServiceInstanceTable Class Reference

#include <service_instance.h>

Inheritance diagram for ServiceInstanceTable:
Collaboration diagram for ServiceInstanceTable:

Public Member Functions

 ServiceInstanceTable (DB *db, const std::string &name)
 
virtual std::unique_ptr< DBEntry > AllocEntry (const DBRequestKey *key) const
 
void Initialize (DBGraph *graph, IFMapDependencyManager *dependency_manager)
 
virtual DBEntry * Add (const DBRequest *request)
 
virtual bool Delete (DBEntry *entry, const DBRequest *request)
 
virtual bool OnChange (DBEntry *entry, const DBRequest *request)
 
void CalculateProperties (DBGraph *graph, IFMapNode *node, ServiceInstance::Properties *properties)
 
virtual bool IFNodeToReq (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
 
virtual bool IFNodeToUuid (IFMapNode *node, boost::uuids::uuid &id)
 
virtual AgentSandeshPtr GetAgentSandesh (const AgentSandeshArguments *args, const std::string &context)
 
- Public Member Functions inherited from AgentDBTable
 AgentDBTable (DB *db, const std::string &name)
 
 AgentDBTable (DB *db, const std::string &name, bool del_on_zero_refcount)
 
virtual ~AgentDBTable ()
 
virtual int PartitionCount () const
 
virtual void Input (DBTablePartition *root, DBClient *client, DBRequest *req)
 
virtual DBEntry * CfgAdd (DBRequest *req)
 
virtual bool Resync (DBEntry *entry, const DBRequest *req)
 
virtual void Clear ()
 
virtual bool IFLinkToReq (IFMapLink *link, IFMapNode *node, const std::string &peer_name, IFMapNode *peer, DBRequest &req)
 
virtual DBTablePartition * AllocPartition (int index)
 
virtual void OnZeroRefcount (AgentDBEntry *e)
 
virtual void NotifyEntry (DBEntryBase *entry)
 
void Notify (DBTablePartBase *partition, DBEntryBase *entry)
 
DBTableBase::ListenerId GetRefListenerId () const
 
AgentDBEntry * FindActiveEntry (const DBEntry *key)
 
AgentDBEntry * FindActiveEntryNoLock (const DBEntry *key)
 
AgentDBEntry * FindActiveEntry (const DBRequestKey *key)
 
AgentDBEntry * FindActiveEntryNoLock (const DBRequestKey *key)
 
AgentDBEntry * Find (const DBEntry *key, bool ret_del)
 
AgentDBEntry * Find (const DBRequestKey *key, bool ret_del)
 
virtual bool CanNotify (IFMapNode *dbe)
 
virtual void Process (DBRequest &req)
 
virtual bool ProcessConfig (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
 
void set_agent (Agent *agent)
 
Agent * agent () const
 
void Flush ()
 
void reset_flush_walk_ref ()
 
SandeshTraceBufferPtr GetOperDBTraceBuf () const
 
- 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
 
void NotifyAllEntries ()
 
DBEntry * Find (const DBEntry *entry)
 
const DBEntry * Find (const DBEntry *entry) const
 
DBEntry * Find (const DBRequestKey *key, int id=-1)
 
const DBEntry * Find (const DBRequestKey *key, int id=-1) const
 
DBEntry * FindNoLock (const DBEntry *entry)
 
DBEntry * FindNoLock (const DBRequestKey *key)
 
virtual DBTablePartBase * GetTablePartition (const DBRequestKey *key)
 
virtual const DBTablePartBase * GetTablePartition (const DBRequestKey *key) const
 
virtual DBTablePartBase * GetTablePartition (const DBEntryBase *entry)
 
virtual const DBTablePartBase * GetTablePartition (const DBEntryBase *entry) const
 
virtual DBTablePartBase * GetTablePartition (const int index)
 
virtual const DBTablePartBase * GetTablePartition (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
 
DB * database ()
 
const DB * database () 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 DBTableBase * CreateTable (DB *db, const std::string &name)
 
- Static Public Member Functions inherited from DBTable
static void DBStateClear (DBTable *table, ListenerId id)
 

Private Member Functions

void ChangeEventHandler (IFMapNode *node, DBEntry *entry)
 
bool HandleAddChange (ServiceInstance **svc_instance, const DBRequest *key)
 
 DISALLOW_COPY_AND_ASSIGN (ServiceInstanceTable)
 

Private Attributes

DBGraph * graph_
 
IFMapDependencyManager * dependency_manager_
 

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 AgentDBTable
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 140 of file service_instance.h.

Constructor & Destructor Documentation

◆ ServiceInstanceTable()

ServiceInstanceTable::ServiceInstanceTable ( DB *  db,
const std::string &  name 
)

Definition at line 745 of file service_instance.cc.

Member Function Documentation

◆ Add()

DBEntry * ServiceInstanceTable::Add ( const DBRequest *  request)
virtual

Reimplemented from DBTable.

Definition at line 800 of file service_instance.cc.

Here is the call graph for this function:

◆ AllocEntry()

std::unique_ptr< DBEntry > ServiceInstanceTable::AllocEntry ( const DBRequestKey *  key) const
virtual

Implements DBTable.

Definition at line 750 of file service_instance.cc.

◆ CalculateProperties()

void ServiceInstanceTable::CalculateProperties ( DBGraph *  graph,
IFMapNode *  node,
ServiceInstance::Properties *  properties 
)

Definition at line 849 of file service_instance.cc.

Here is the call graph for this function:

◆ ChangeEventHandler()

void ServiceInstanceTable::ChangeEventHandler ( IFMapNode *  node,
DBEntry *  entry 
)
private

Definition at line 891 of file service_instance.cc.

Here is the call graph for this function:

◆ CreateTable()

DBTableBase * ServiceInstanceTable::CreateTable ( DB *  db,
const std::string &  name 
)
static

Definition at line 928 of file service_instance.cc.

Here is the call graph for this function:

◆ Delete()

bool ServiceInstanceTable::Delete ( DBEntry *  entry,
const DBRequest *  request 
)
virtual

Reimplemented from DBTable.

Definition at line 806 of file service_instance.cc.

Here is the call graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

ServiceInstanceTable::DISALLOW_COPY_AND_ASSIGN ( ServiceInstanceTable  )
private

◆ GetAgentSandesh()

AgentSandeshPtr ServiceInstanceTable::GetAgentSandesh ( const AgentSandeshArguments *  args,
const std::string &  context 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 736 of file service_instance.cc.

Here is the call graph for this function:

◆ HandleAddChange()

bool ServiceInstanceTable::HandleAddChange ( ServiceInstance **  svc_instance,
const DBRequest *  key 
)
private

Definition at line 757 of file service_instance.cc.

Here is the call graph for this function:

◆ IFNodeToReq()

bool ServiceInstanceTable::IFNodeToReq ( IFMapNode *  node,
DBRequest &  req,
const boost::uuids::uuid &  u 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 833 of file service_instance.cc.

Here is the call graph for this function:

◆ IFNodeToUuid()

bool ServiceInstanceTable::IFNodeToUuid ( IFMapNode *  node,
boost::uuids::uuid &  id 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 884 of file service_instance.cc.

Here is the call graph for this function:

◆ Initialize()

void ServiceInstanceTable::Initialize ( DBGraph *  graph,
IFMapDependencyManager *  dependency_manager 
)

Definition at line 822 of file service_instance.cc.

Here is the call graph for this function:

◆ OnChange()

bool ServiceInstanceTable::OnChange ( DBEntry *  entry,
const DBRequest *  request 
)
virtual

Reimplemented from DBTable.

Definition at line 816 of file service_instance.cc.

Here is the call graph for this function:

Member Data Documentation

◆ dependency_manager_

IFMapDependencyManager* ServiceInstanceTable::dependency_manager_
private

Definition at line 189 of file service_instance.h.

◆ graph_

DBGraph* ServiceInstanceTable::graph_
private

Definition at line 188 of file service_instance.h.


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