diff options
Diffstat (limited to 'src/zenserver/projectstore/projectstore.h')
| -rw-r--r-- | src/zenserver/projectstore/projectstore.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/zenserver/projectstore/projectstore.h b/src/zenserver/projectstore/projectstore.h index dcbe8cdab..a2f92fb25 100644 --- a/src/zenserver/projectstore/projectstore.h +++ b/src/zenserver/projectstore/projectstore.h @@ -213,13 +213,14 @@ public: Oplog* NewOplog(std::string_view OplogId, const std::filesystem::path& MarkerPath); Oplog* OpenOplog(std::string_view OplogId); void DeleteOplog(std::string_view OplogId); - void IterateOplogs(std::function<void(const Oplog&)>&& Fn) const; - void IterateOplogs(std::function<void(Oplog&)>&& Fn); + void IterateOplogs(std::function<void(const RwLock::SharedLockScope&, const Oplog&)>&& Fn) const; + void IterateOplogs(std::function<void(const RwLock::SharedLockScope&, Oplog&)>&& Fn); std::vector<std::string> ScanForOplogs() const; - bool IsExpired(const GcClock::TimePoint ExpireTime) const; - bool IsExpired(const GcClock::TimePoint ExpireTime, const ProjectStore::Oplog& Oplog) const; - void TouchProject() const; - void TouchOplog(std::string_view Oplog) const; + bool IsExpired(const RwLock::SharedLockScope&, const GcClock::TimePoint ExpireTime) const; + bool IsExpired(const RwLock::SharedLockScope&, const GcClock::TimePoint ExpireTime, const ProjectStore::Oplog& Oplog) const; + bool IsExpired(const GcClock::TimePoint ExpireTime, const ProjectStore::Oplog& Oplog) const; + void TouchProject() const; + void TouchOplog(std::string_view Oplog) const; Project(ProjectStore* PrjStore, CidStore& Store, std::filesystem::path BasePath); virtual ~Project(); @@ -244,9 +245,12 @@ public: mutable tsl::robin_map<std::string, GcClock::Tick> m_LastAccessTimes; std::filesystem::path BasePathForOplog(std::string_view OplogId); - bool IsExpired(const std::string& EntryName, const std::filesystem::path& MarkerPath, const GcClock::TimePoint ExpireTime) const; - void WriteAccessTimes(); - void ReadAccessTimes(); + bool IsExpired(const RwLock::SharedLockScope&, + const std::string& EntryName, + const std::filesystem::path& MarkerPath, + const GcClock::TimePoint ExpireTime) const; + void WriteAccessTimes(); + void ReadAccessTimes(); }; // Oplog* OpenProjectOplog(std::string_view ProjectId, std::string_view OplogId); |