OpenSDN source code
|
#include <agent_db.h>
Public Member Functions | |
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 | IFNodeToReq (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &uuid) |
virtual bool | IFLinkToReq (IFMapLink *link, IFMapNode *node, const std::string &peer_name, IFMapNode *peer, DBRequest &req) |
virtual bool | IFNodeToUuid (IFMapNode *node, boost::uuids::uuid &id) |
virtual DBTablePartition * | AllocPartition (int index) |
virtual void | OnZeroRefcount (AgentDBEntry *e) |
virtual void | NotifyEntry (DBEntryBase *entry) |
virtual AgentSandeshPtr | GetAgentSandesh (const AgentSandeshArguments *args, const std::string &context) |
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 |
![]() | |
DBTable (DB *db, const std::string &name) | |
virtual | ~DBTable () |
void | Init () |
virtual std::unique_ptr< DBEntry > | AllocEntry (const DBRequestKey *key) const =0 |
virtual size_t | Hash (const DBEntry *entry) const |
virtual size_t | Hash (const DBRequestKey *key) const |
virtual DBEntry * | Add (const DBRequest *req) |
virtual bool | OnChange (DBEntry *entry, const DBRequest *req) |
virtual bool | Delete (DBEntry *entry, const DBRequest *req) |
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 () |
![]() | |
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 Attributes | |
static const int | kPartitionCount = 1 |
![]() | |
static const int | kIterationToYield = 256 |
![]() | |
static const int | kInvalidId = -1 |
Private Member Functions | |
AgentDBEntry * | Find (const DBEntry *key) |
AgentDBEntry * | Find (const DBRequestKey *key) |
DISALLOW_COPY_AND_ASSIGN (AgentDBTable) | |
Private Attributes | |
DBTableBase::ListenerId | ref_listener_id_ |
Agent * | agent_ |
SandeshTraceBufferPtr | OperDBTraceBuf |
DBTable::DBTableWalkRef | flush_walk_ref_ |
Additional Inherited Members | |
![]() | |
typedef boost::intrusive_ptr < DBTableWalk > | DBTableWalkRef |
typedef boost::function< bool(DBTablePartBase *, DBEntryBase *)> | WalkFn |
typedef boost::function< void(DBTableWalkRef, DBTableBase *)> | WalkCompleteFn |
![]() | |
typedef boost::function< void(DBTablePartBase *, DBEntryBase *)> | ChangeCallback |
typedef int | ListenerId |
![]() | |
static void | DBStateClear (DBTable *table, ListenerId id) |
Definition at line 148 of file agent_db.h.
AgentDBTable::AgentDBTable | ( | DB * | db, |
const std::string & | name | ||
) |
AgentDBTable::AgentDBTable | ( | DB * | db, |
const std::string & | name, | ||
bool | del_on_zero_refcount | ||
) |
|
virtual |
|
inline |
Definition at line 213 of file agent_db.h.
|
inlinevirtual |
Reimplemented from DBTable.
Definition at line 180 of file agent_db.h.
|
inlinevirtual |
Definition at line 202 of file agent_db.h.
Definition at line 158 of file agent_db.h.
|
virtual |
Reimplemented in InterfaceTable, VnTable, VrfTable, and PhysicalDeviceVnTable.
Definition at line 215 of file agent_db.cc.
|
private |
AgentDBEntry * AgentDBTable::Find | ( | const DBEntry * | key, |
bool | ret_del | ||
) |
AgentDBEntry * AgentDBTable::Find | ( | const DBRequestKey * | key, |
bool | ret_del | ||
) |
|
private |
|
private |
AgentDBEntry * AgentDBTable::FindActiveEntry | ( | const DBEntry * | key | ) |
AgentDBEntry * AgentDBTable::FindActiveEntry | ( | const DBRequestKey * | key | ) |
AgentDBEntry * AgentDBTable::FindActiveEntryNoLock | ( | const DBEntry * | key | ) |
AgentDBEntry * AgentDBTable::FindActiveEntryNoLock | ( | const DBRequestKey * | key | ) |
void AgentDBTable::Flush | ( | ) |
|
inlinevirtual |
Reimplemented in NextHopTable, HealthCheckTable, VnTable, InterfaceTable, VrfTable, AclTable, TagTable, ServiceInstanceTable, AgentQosConfigTable, VxLanTable, PhysicalDeviceTable, MirrorTable, PolicySetTable, PhysicalDeviceVnTable, BridgeDomainTable, ForwardingClassTable, SecurityLoggingObjectTable, MplsTable, CryptTunnelTable, VrfAssignTable, QosQueueTable, MulticastPolicyTable, VmTable, and SgTable.
Definition at line 186 of file agent_db.h.
|
inline |
Definition at line 217 of file agent_db.h.
|
inline |
Definition at line 195 of file agent_db.h.
|
inlinevirtual |
Definition at line 172 of file agent_db.h.
|
inlinevirtual |
Reimplemented in HealthCheckTable, InterfaceTable, VnTable, VrfTable, AclTable, ServiceInstanceTable, AgentQosConfigTable, TagTable, PhysicalDeviceTable, PhysicalDeviceVnTable, PolicySetTable, BridgeDomainTable, ForwardingClassTable, SecurityLoggingObjectTable, QosQueueTable, MulticastPolicyTable, VmTable, and SgTable.
Definition at line 167 of file agent_db.h.
|
virtual |
Reimplemented in HealthCheckTable, InterfaceTable, VnTable, AclTable, ServiceInstanceTable, AgentQosConfigTable, TagTable, PhysicalDeviceTable, PolicySetTable, BridgeDomainTable, ForwardingClassTable, SecurityLoggingObjectTable, QosQueueTable, MulticastPolicyTable, VmTable, and SgTable.
Definition at line 183 of file agent_db.cc.
|
virtual |
Reimplemented from DBTable.
Reimplemented in VrfTable.
Definition at line 188 of file agent_db.cc.
|
inline |
Definition at line 192 of file agent_db.h.
|
virtual |
|
inlinevirtual |
Reimplemented in NextHopTable, VrfTable, MirrorTable, VxLanTable, and MplsTable.
Definition at line 183 of file agent_db.h.
|
inlinevirtual |
Reimplemented from DBTable.
Definition at line 155 of file agent_db.h.
|
virtual |
Reimplemented in NextHopTable, VxLanTable, MplsTable, and CryptTunnelTable.
Definition at line 231 of file agent_db.cc.
|
inlinevirtual |
Reimplemented in HealthCheckTable, VnTable, InterfaceTable, VrfTable, AgentQosConfigTable, TagTable, PhysicalDeviceTable, PolicySetTable, BridgeDomainTable, ForwardingClassTable, SecurityLoggingObjectTable, QosQueueTable, MulticastPolicyTable, VmTable, and SgTable.
Definition at line 206 of file agent_db.h.
void AgentDBTable::reset_flush_walk_ref | ( | ) |
Definition at line 98 of file agent_db.cc.
Reimplemented in NextHopTable, AgentOperDBTable, MirrorTable, PhysicalDeviceVnTable, and CryptTunnelTable.
Definition at line 159 of file agent_db.h.
|
inline |
|
private |
Definition at line 223 of file agent_db.h.
|
private |
Definition at line 225 of file agent_db.h.
|
static |
Definition at line 150 of file agent_db.h.
|
private |
Definition at line 224 of file agent_db.h.
|
private |
Definition at line 222 of file agent_db.h.