OpenSDN source code
KSyncDBObject Class Referenceabstract

#include <ksync_object.h>

Inheritance diagram for KSyncDBObject:
Collaboration diagram for KSyncDBObject:

Public Types

enum  DBFilterResp {
  DBFilterAccept , DBFilterIgnore , DBFilterDelete , DBFilterDelAdd ,
  DBFilterMax
}
 
- Public Types inherited from KSyncObject
typedef boost::intrusive::member_hook< KSyncEntry, boost::intrusive::set_member_hook<>, &KSyncEntry::node_KSyncObjectNode
 
typedef boost::intrusive::set< KSyncEntry, KSyncObjectNodeTree
 
typedef boost::intrusive::member_hook< KSyncFwdReference, boost::intrusive::set_member_hook<>, &KSyncFwdReference::node_KSyncFwdRefNode
 
typedef boost::intrusive::set< KSyncFwdReference, KSyncFwdRefNodeFwdRefTree
 
typedef boost::intrusive::member_hook< KSyncBackReference, boost::intrusive::set_member_hook<>, &KSyncBackReference::node_KSyncBackRefNode
 
typedef boost::intrusive::set< KSyncBackReference, KSyncBackRefNodeBackRefTree
 

Public Member Functions

 KSyncDBObject (const std::string &name)
 
 KSyncDBObject (const std::string &name, int max_index)
 
 KSyncDBObject (const std::string &name, DBTableBase *table)
 
 KSyncDBObject (const std::string &name, DBTableBase *table, int max_index)
 
virtual ~KSyncDBObject ()
 
void RegisterDb (DBTableBase *table)
 
void UnregisterDb (DBTableBase *table)
 
void Notify (DBTablePartBase *partition, DBEntryBase *entry)
 
DBTableBaseGetDBTable ()
 
DBTableBase::ListenerId GetListenerId (DBTableBase *table)
 
virtual DBFilterResp DBEntryFilter (const DBEntry *entry, const KSyncDBEntry *ksync)
 
virtual KSyncEntryDBToKSyncEntry (const DBEntry *entry)=0
 
void set_test_id (DBTableBase::ListenerId id)
 
DBTableBase::ListenerId id () const
 
- Public Member Functions inherited from KSyncObject
 KSyncObject (const std::string &name)
 
 KSyncObject (const std::string &name, int max_index)
 
virtual ~KSyncObject ()
 
void InitStaleEntryCleanup (boost::asio::io_context &ios, uint32_t cleanup_time, uint32_t cleanup_intvl, uint16_t entries_per_intvl)
 
void NotifyEvent (KSyncEntry *entry, KSyncEntry::KSyncEvent event)
 
void SafeNotifyEvent (KSyncEntry *entry, KSyncEntry::KSyncEvent event)
 
virtual void NetlinkAck (KSyncEntry *entry, KSyncEntry::KSyncEvent event)
 
void BackRefAdd (KSyncEntry *key, KSyncEntry *reference)
 
void BackRefDel (KSyncEntry *key)
 
void BackRefReEval (KSyncEntry *key)
 
KSyncEntryCreate (const KSyncEntry *key)
 
KSyncEntryCreate (const KSyncEntry *key, bool skip_lookup)
 
KSyncEntryCreateStale (const KSyncEntry *key)
 
void Change (KSyncEntry *entry)
 
void Delete (KSyncEntry *entry)
 
KSyncEntryFind (const KSyncEntry *key)
 
KSyncEntryNext (const KSyncEntry *entry) const
 
KSyncEntryGetReference (const KSyncEntry *key)
 
virtual KSyncEntryAlloc (const KSyncEntry *key, uint32_t index)=0
 
virtual void Free (KSyncEntry *entry)
 
virtual void EmptyTable (void)
 
bool IsEmpty (void)
 
virtual bool DoEventTrace (void)
 
virtual void PreFree (KSyncEntry *entry)
 
std::size_t Size ()
 
void set_delete_scheduled ()
 
bool delete_scheduled ()
 
virtual SandeshTraceBufferPtr GetKSyncTraceBuf ()
 

Private Member Functions

virtual void CleanupOnDel (KSyncEntry *kentry)
 
 DISALLOW_COPY_AND_ASSIGN (KSyncDBObject)
 

Private Attributes

DBTableBasetable_
 
DBTableBase::ListenerId id_
 
DBTableBase::ListenerId test_id_
 
KSyncIndexTable index_table_
 

Additional Inherited Members

- Static Public Member Functions inherited from KSyncObject
static void Shutdown ()
 
- Protected Member Functions inherited from KSyncObject
KSyncEntryCreateImpl (const KSyncEntry *key)
 
void ClearStale (KSyncEntry *entry)
 
void ChangeKey (KSyncEntry *entry, uint32_t arg)
 
virtual void UpdateKey (KSyncEntry *entry, uint32_t arg)
 
virtual uint32_t GetKey (KSyncEntry *entry)
 
- Protected Attributes inherited from KSyncObject
tbb::recursive_mutex lock_
 

Detailed Description

Definition at line 208 of file ksync_object.h.

Member Enumeration Documentation

◆ DBFilterResp

Enumerator
DBFilterAccept 
DBFilterIgnore 
DBFilterDelete 
DBFilterDelAdd 
DBFilterMax 

Definition at line 215 of file ksync_object.h.

Constructor & Destructor Documentation

◆ KSyncDBObject() [1/4]

KSyncDBObject::KSyncDBObject ( const std::string &  name)

Definition at line 281 of file ksync_object.cc.

◆ KSyncDBObject() [2/4]

KSyncDBObject::KSyncDBObject ( const std::string &  name,
int  max_index 
)

Definition at line 285 of file ksync_object.cc.

◆ KSyncDBObject() [3/4]

KSyncDBObject::KSyncDBObject ( const std::string &  name,
DBTableBase table 
)

Definition at line 290 of file ksync_object.cc.

Here is the call graph for this function:

◆ KSyncDBObject() [4/4]

KSyncDBObject::KSyncDBObject ( const std::string &  name,
DBTableBase table,
int  max_index 
)

Definition at line 296 of file ksync_object.cc.

Here is the call graph for this function:

◆ ~KSyncDBObject()

KSyncDBObject::~KSyncDBObject ( )
virtual

Definition at line 303 of file ksync_object.cc.

Here is the call graph for this function:

Member Function Documentation

◆ CleanupOnDel()

void KSyncDBObject::CleanupOnDel ( KSyncEntry kentry)
privatevirtual

Reimplemented from KSyncObject.

Definition at line 340 of file ksync_object.cc.

Here is the call graph for this function:

◆ DBEntryFilter()

KSyncDBObject::DBFilterResp KSyncDBObject::DBEntryFilter ( const DBEntry entry,
const KSyncDBEntry ksync 
)
virtual

◆ DBToKSyncEntry()

◆ DISALLOW_COPY_AND_ASSIGN()

KSyncDBObject::DISALLOW_COPY_AND_ASSIGN ( KSyncDBObject  )
private

◆ GetDBTable()

DBTableBase* KSyncDBObject::GetDBTable ( )
inline

Definition at line 244 of file ksync_object.h.

◆ GetListenerId()

DBTableBase::ListenerId KSyncDBObject::GetListenerId ( DBTableBase table)

Definition at line 332 of file ksync_object.cc.

◆ id()

DBTableBase::ListenerId KSyncDBObject::id ( ) const
inline

Definition at line 256 of file ksync_object.h.

◆ Notify()

void KSyncDBObject::Notify ( DBTablePartBase partition,
DBEntryBase entry 
)

Definition at line 363 of file ksync_object.cc.

Here is the call graph for this function:

◆ RegisterDb()

void KSyncDBObject::RegisterDb ( DBTableBase table)

Definition at line 309 of file ksync_object.cc.

Here is the call graph for this function:

◆ set_test_id()

void KSyncDBObject::set_test_id ( DBTableBase::ListenerId  id)

Definition at line 328 of file ksync_object.cc.

Here is the call graph for this function:

◆ UnregisterDb()

void KSyncDBObject::UnregisterDb ( DBTableBase table)

Definition at line 315 of file ksync_object.cc.

Here is the call graph for this function:

Member Data Documentation

◆ id_

DBTableBase::ListenerId KSyncDBObject::id_
private

Definition at line 263 of file ksync_object.h.

◆ index_table_

KSyncIndexTable KSyncDBObject::index_table_
private

Definition at line 266 of file ksync_object.h.

◆ table_

DBTableBase* KSyncDBObject::table_
private

Definition at line 262 of file ksync_object.h.

◆ test_id_

DBTableBase::ListenerId KSyncDBObject::test_id_
private

Definition at line 264 of file ksync_object.h.


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