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

#include <db_entry.h>

Inheritance diagram for DBEntryBase:
Collaboration diagram for DBEntryBase:

Public Types

typedef DBTableBase::ListenerId ListenerId
 
typedef std::unique_ptr
< DBRequestKey
KeyPtr
 

Public Member Functions

 DBEntryBase ()
 
virtual ~DBEntryBase ()
 
virtual std::string ToString () const =0
 
virtual KeyPtr GetDBRequestKey () const =0
 
virtual bool IsMoreSpecific (const std::string &match) const
 
virtual bool IsLessSpecific (const std::string &match) const
 
void SetState (DBTableBase *tbl_base, ListenerId listener, DBState *state)
 
void ClearState (DBTableBase *tbl_base, ListenerId listener)
 
DBStateGetState (DBTableBase *tbl_base, ListenerId listener) const
 
const DBStateGetState (const DBTableBase *tbl_base, ListenerId listener) const
 
bool is_state_empty (DBTablePartBase *tpart)
 
bool is_state_empty_unlocked (DBTablePartBase *tpart)
 
void Delete ()
 
void MarkDelete ()
 
void ClearDelete ()
 
bool IsDeleted () const
 
void set_onlist ()
 
void clear_onlist ()
 
bool is_onlist ()
 
void SetOnRemoveQ ()
 
bool IsOnRemoveQ ()
 
void ClearOnRemoveQ ()
 
void set_last_change_at (uint64_t time)
 
void set_last_change_at_to_now ()
 
const uint64_t last_change_at () const
 
const std::string last_change_at_str () const
 
void set_last_update_at (uint64_t time)
 
void set_last_update_at_to_now ()
 
const uint64_t last_update_at () const
 
DBTablePartBaseget_table_partition () const
 
void set_table_partition (DBTablePartBase *tpart)
 
DBTableBaseget_table () const
 
void Notify ()
 

Public Attributes

boost::intrusive::list_member_hook chg_list_
 

Private Types

enum  DbEntryFlags { Onlist = 1 << 0, DeleteMarked = 1 << 1 }
 
typedef std::map< ListenerId,
DBState * > 
StateMap
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (DBEntryBase)
 

Private Attributes

DBTablePartBasetpart_
 
StateMap state_
 
uint8_t flags
 
tbb::atomic< bool > onremoveq_
 
uint64_t last_change_at_
 
uint64_t last_update_at_
 

Detailed Description

Definition at line 22 of file db_entry.h.

Member Typedef Documentation

typedef std::unique_ptr<DBRequestKey> DBEntryBase::KeyPtr

Definition at line 25 of file db_entry.h.

Definition at line 24 of file db_entry.h.

typedef std::map<ListenerId, DBState *> DBEntryBase::StateMap
private

Definition at line 83 of file db_entry.h.

Member Enumeration Documentation

Enumerator
Onlist 
DeleteMarked 

Definition at line 79 of file db_entry.h.

Constructor & Destructor Documentation

DBEntryBase::DBEntryBase ( )

Definition at line 14 of file db_entry.cc.

DBEntryBase::~DBEntryBase ( )
virtual

Definition at line 19 of file db_entry.cc.

Member Function Documentation

void DBEntryBase::clear_onlist ( )
inline

Definition at line 52 of file db_entry.h.

void DBEntryBase::ClearDelete ( )
inline

Definition at line 48 of file db_entry.h.

void DBEntryBase::ClearOnRemoveQ ( )
inline

Definition at line 59 of file db_entry.h.

void DBEntryBase::ClearState ( DBTableBase tbl_base,
ListenerId  listener 
)

Definition at line 73 of file db_entry.cc.

Here is the call graph for this function:

void DBEntryBase::Delete ( )

Definition at line 131 of file db_entry.cc.

Here is the call graph for this function:

DBEntryBase::DISALLOW_COPY_AND_ASSIGN ( DBEntryBase  )
private
DBTableBase * DBEntryBase::get_table ( ) const

Definition at line 119 of file db_entry.cc.

Here is the call graph for this function:

DBTablePartBase * DBEntryBase::get_table_partition ( ) const

Definition at line 115 of file db_entry.cc.

DBState * DBEntryBase::GetState ( DBTableBase tbl_base,
ListenerId  listener 
) const

Definition at line 37 of file db_entry.cc.

Here is the call graph for this function:

const DBState * DBEntryBase::GetState ( const DBTableBase tbl_base,
ListenerId  listener 
) const

Definition at line 47 of file db_entry.cc.

Here is the call graph for this function:

bool DBEntryBase::is_onlist ( )
inline

Definition at line 53 of file db_entry.h.

bool DBEntryBase::is_state_empty ( DBTablePartBase tpart)

Definition at line 87 of file db_entry.cc.

Here is the call graph for this function:

bool DBEntryBase::is_state_empty_unlocked ( DBTablePartBase tpart)

Definition at line 92 of file db_entry.cc.

bool DBEntryBase::IsDeleted ( ) const
inline

Definition at line 49 of file db_entry.h.

virtual bool DBEntryBase::IsLessSpecific ( const std::string &  match) const
inlinevirtual

Reimplemented in Inet6Route, InetRoute, Inet6VpnRoute, and InetVpnRoute.

Definition at line 34 of file db_entry.h.

virtual bool DBEntryBase::IsMoreSpecific ( const std::string &  match) const
inlinevirtual

Reimplemented in Inet6Route, InetRoute, Inet6VpnRoute, and InetVpnRoute.

Definition at line 31 of file db_entry.h.

bool DBEntryBase::IsOnRemoveQ ( )
inline

Definition at line 58 of file db_entry.h.

const uint64_t DBEntryBase::last_change_at ( ) const
inline

Definition at line 68 of file db_entry.h.

const std::string DBEntryBase::last_change_at_str ( ) const

Definition at line 123 of file db_entry.cc.

Here is the call graph for this function:

const uint64_t DBEntryBase::last_update_at ( ) const
inline

Definition at line 72 of file db_entry.h.

void DBEntryBase::MarkDelete ( )
inline

Definition at line 47 of file db_entry.h.

void DBEntryBase::Notify ( )

Definition at line 127 of file db_entry.cc.

Here is the call graph for this function:

void DBEntryBase::set_last_change_at ( uint64_t  time)

Definition at line 100 of file db_entry.cc.

void DBEntryBase::set_last_change_at_to_now ( )

Definition at line 96 of file db_entry.cc.

Here is the call graph for this function:

void DBEntryBase::set_last_update_at ( uint64_t  time)

Definition at line 108 of file db_entry.cc.

void DBEntryBase::set_last_update_at_to_now ( )

Definition at line 104 of file db_entry.cc.

Here is the call graph for this function:

void DBEntryBase::set_onlist ( )
inline

Definition at line 51 of file db_entry.h.

void DBEntryBase::set_table_partition ( DBTablePartBase tpart)

Definition at line 111 of file db_entry.cc.

void DBEntryBase::SetOnRemoveQ ( )
inline

Definition at line 55 of file db_entry.h.

void DBEntryBase::SetState ( DBTableBase tbl_base,
ListenerId  listener,
DBState state 
)

Definition at line 22 of file db_entry.cc.

Here is the call graph for this function:

Member Data Documentation

boost::intrusive::list_member_hook DBEntryBase::chg_list_

Definition at line 64 of file db_entry.h.

uint8_t DBEntryBase::flags
private

Definition at line 86 of file db_entry.h.

uint64_t DBEntryBase::last_change_at_
private

Definition at line 88 of file db_entry.h.

uint64_t DBEntryBase::last_update_at_
private

Definition at line 89 of file db_entry.h.

tbb::atomic<bool> DBEntryBase::onremoveq_
private

Definition at line 87 of file db_entry.h.

StateMap DBEntryBase::state_
private

Definition at line 85 of file db_entry.h.

DBTablePartBase* DBEntryBase::tpart_
private

Definition at line 84 of file db_entry.h.


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