Restrict access to data members.

This commit is contained in:
Howard Hinnant
2015-05-14 12:56:46 -04:00
committed by Vinnie Falco
parent 5adb68bba4
commit dddcc09378

View File

@@ -40,20 +40,20 @@ namespace NodeStore {
class DatabaseImp class DatabaseImp
: public Database : public Database
{ {
public: private:
beast::Journal m_journal; beast::Journal m_journal;
Scheduler& m_scheduler; Scheduler& m_scheduler;
// Persistent key/value storage. // Persistent key/value storage.
std::unique_ptr <Backend> m_backend; std::unique_ptr <Backend> m_backend;
// Larger key/value storage, but not necessarily persistent. // Larger key/value storage, but not necessarily persistent.
std::unique_ptr <Backend> m_fastBackend; std::unique_ptr <Backend> m_fastBackend;
protected:
// Positive cache // Positive cache
TaggedCache <uint256, NodeObject> m_cache; TaggedCache <uint256, NodeObject> m_cache;
// Negative cache // Negative cache
KeyCache <uint256> m_negCache; KeyCache <uint256> m_negCache;
private:
std::mutex m_readLock; std::mutex m_readLock;
std::condition_variable m_readCondVar; std::condition_variable m_readCondVar;
std::condition_variable m_readGenCondVar; std::condition_variable m_readGenCondVar;
@@ -62,7 +62,7 @@ public:
std::vector <std::thread> m_readThreads; std::vector <std::thread> m_readThreads;
bool m_readShut; bool m_readShut;
uint64_t m_readGen; // current read generation uint64_t m_readGen; // current read generation
public:
DatabaseImp (std::string const& name, DatabaseImp (std::string const& name,
Scheduler& scheduler, Scheduler& scheduler,
int readThreads, int readThreads,