mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 03:37:49 +02:00
Make persistent storage synchronization interval configurable
This commit is contained in:
parent
fdcea5537c
commit
3fd69311cb
4 changed files with 61 additions and 21 deletions
|
@ -109,6 +109,7 @@ namespace data
|
|||
void Load ();
|
||||
bool LoadRouterInfo (const std::string & path);
|
||||
void SaveUpdated ();
|
||||
void RemoveExpired ();
|
||||
void Run (); // exploratory thread
|
||||
void Explore (int numDestinations);
|
||||
void Publish ();
|
||||
|
@ -129,6 +130,8 @@ namespace data
|
|||
std::map<IdentHash, std::shared_ptr<LeaseSet> > m_LeaseSets;
|
||||
mutable std::mutex m_RouterInfosMutex;
|
||||
std::map<IdentHash, std::shared_ptr<RouterInfo> > m_RouterInfos;
|
||||
mutable std::mutex m_UnsavedProfilesMutex;
|
||||
std::map<IdentHash, std::shared_ptr<RouterProfile>> m_UnsavedProfiles;
|
||||
mutable std::mutex m_FloodfillsMutex;
|
||||
std::list<std::shared_ptr<RouterInfo> > m_Floodfills;
|
||||
|
||||
|
@ -145,6 +148,7 @@ namespace data
|
|||
friend class NetDbRequests;
|
||||
NetDbRequests m_Requests;
|
||||
|
||||
unsigned m_PersistSyncInterval;
|
||||
bool m_PersistProfiles;
|
||||
|
||||
/** router info we are bootstrapping from or nullptr if we are not currently doing that*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue