forked from matthewvon/rocks_snmp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from matthewvon/master
clean up to simplify library build/use via gradle
- Loading branch information
Showing
3 changed files
with
93 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* @file stats_table_impl.h | ||
* @author matthewv | ||
* @date Jan 8, 2023 | ||
* @date Copyright 2012-2014 | ||
* | ||
* @brief | ||
*/ | ||
|
||
#ifndef STATS_TABLE_IMPL_H | ||
#define STATS_TABLE_IMPL__H | ||
|
||
#include "libmevent/meventmgr.h" | ||
|
||
#include "rocksdb/cache.h" | ||
#include "rocksdb/db.h" | ||
#include "rocksdb/statistics.h" | ||
#include "snmpagent/snmp_agent.h" | ||
|
||
class StatsTableImpl : public StatsTable { | ||
/**************************************************************** | ||
* Member objects | ||
****************************************************************/ | ||
public: | ||
protected: | ||
MEventMgrPtr m_Mgr; | ||
SnmpAgentPtr m_Agent; //!< snmp manager instance | ||
|
||
private: | ||
/**************************************************************** | ||
* Member functions | ||
****************************************************************/ | ||
public: | ||
StatsTableImpl() = delete; | ||
StatsTableImpl(bool StartWorker = true); | ||
|
||
virtual ~StatsTableImpl(); | ||
|
||
bool AddTable(const std::shared_ptr<rocksdb::Statistics> &stats, | ||
unsigned TableId, const std::string &name) override; | ||
|
||
bool AddTable(const std::shared_ptr<rocksdb::Cache> &cache, | ||
unsigned TableId, const std::string &name) override; | ||
|
||
bool AddTable(rocksdb::DB * dbase, | ||
unsigned TableId, const std::string &name) override; | ||
|
||
/// debug | ||
void Dump() override; | ||
|
||
protected: | ||
void UpdateTableNameList(unsigned TableId, const std::string &name); | ||
|
||
private: | ||
StatsTableImpl(const StatsTableImpl &); //!< disabled: copy operator | ||
StatsTableImpl &operator=(const StatsTableImpl &); //!< disabled: assignment operator | ||
|
||
}; // StatsTable | ||
|
||
#endif // ifndef STATS_TABLE_IMPL_H |