|
OpenSDN source code
|
#include <db.h>

Public Types | |
| typedef boost::function< DBTableBase *(DB *, const std::string &)> | CreateFunction |
| typedef std::map< std::string, DBTableBase * > | TableMap |
| typedef TableMap::iterator | iterator |
| typedef TableMap::const_iterator | const_iterator |
Public Member Functions | |
| DB (int task_id=-1) | |
| ~DB () | |
| DBPartition * | GetPartition (int index) |
| const DBPartition * | GetPartition (int index) const |
| void | AddTable (DBTableBase *tbl_base) |
| DBTableBase * | CreateTable (const std::string &name) |
| DBTableBase * | FindTable (const std::string &name) |
| iterator | FindTableIter (const std::string &name) |
| void | RemoveTable (DBTableBase *tbl_base) |
| DBTableWalker * | GetWalker () |
| DBTableWalkMgr * | GetWalkMgr () |
| DBGraph * | GetGraph (const std::string &name) |
| void | SetGraph (const std::string &name, DBGraph *graph) |
| void | SetQueueDisable (bool disable) |
| void | Clear () |
| bool | IsDBQueueEmpty () const |
| iterator | begin () |
| iterator | end () |
| iterator | lower_bound (const std::string &name) |
| const_iterator | const_begin () |
| const_iterator | const_end () |
| const_iterator | const_lower_bound (const std::string &name) |
| int | task_id () const |
Static Public Member Functions | |
| static void | SetPartitionCount (int partition_count) |
| static int | PartitionCount () |
| static void | RegisterFactory (const std::string &prefix, CreateFunction create_fn) |
| static void | ClearFactoryRegistry () |
Private Types | |
| typedef std::map< std::string, CreateFunction > | FactoryMap |
| typedef std::map< std::string, DBGraph * > | GraphMap |
Private Member Functions | |
| DISALLOW_COPY_AND_ASSIGN (DB) | |
Static Private Member Functions | |
| static FactoryMap * | factories () |
Private Attributes | |
| tbb::mutex | mutex_ |
| int | task_id_ |
| std::vector< DBPartition * > | partitions_ |
| TableMap | tables_ |
| GraphMap | graph_map_ |
| std::unique_ptr< DBTableWalker > | walker_ |
| std::unique_ptr< DBTableWalkMgr > | walk_mgr_ |
Static Private Attributes | |
| static int | partition_count_ |
| typedef TableMap::const_iterator DB::const_iterator |
| typedef boost::function<DBTableBase *(DB *, const std::string &)> DB::CreateFunction |
|
private |
|
private |
| typedef TableMap::iterator DB::iterator |
| typedef std::map<std::string, DBTableBase *> DB::TableMap |
| DB::DB | ( | int | task_id = -1 | ) |
| void DB::AddTable | ( | DBTableBase * | tbl_base | ) |
|
static |
|
inline |
|
inline |
|
inline |
| DBTableBase * DB::CreateTable | ( | const std::string & | name | ) |
|
private |
|
staticprivate |
| DBTableBase * DB::FindTable | ( | const std::string & | name | ) |
| DB::iterator DB::FindTableIter | ( | const std::string & | name | ) |
| DBPartition * DB::GetPartition | ( | int | index | ) |
| const DBPartition * DB::GetPartition | ( | int | index | ) | const |
|
inline |
|
inline |
| bool DB::IsDBQueueEmpty | ( | ) | const |
|
static |
|
static |
| void DB::RemoveTable | ( | DBTableBase * | tbl_base | ) |
| void DB::SetGraph | ( | const std::string & | name, |
| DBGraph * | graph | ||
| ) |
| void DB::SetQueueDisable | ( | bool | disable | ) |
|
private |
|
private |
|
private |