From 3bbb0d326bec3b3379c831b6a4cdc00438ac67f5 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 27 Oct 2021 21:01:50 +0200 Subject: Lockfile implementation (#24) Implemented lockfile synchronization To be used instead of or in conjunction with existing events to coordinate launching and discovery of server instances --- zenstore/include/zenstore/basicfile.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'zenstore/include') diff --git a/zenstore/include/zenstore/basicfile.h b/zenstore/include/zenstore/basicfile.h index 7ae35dea6..e4414787c 100644 --- a/zenstore/include/zenstore/basicfile.h +++ b/zenstore/include/zenstore/basicfile.h @@ -12,6 +12,8 @@ namespace zen { +class CbObject; + /** * Probably the most basic file abstraction in the universe * @@ -80,6 +82,22 @@ private: using BasicFile::Open; }; +/** Lock file abstraction + + */ + +class LockFile : protected BasicFile +{ +public: + LockFile(); + ~LockFile(); + + void Create(std::filesystem::path FileName, CbObject Payload, std::error_code& Ec); + void Update(CbObject Payload, std::error_code& Ec); + +private: +}; + ZENCORE_API void basicfile_forcelink(); } // namespace zen -- cgit v1.2.3