From 00fb9c475e7bd68a12d6d581539862c31aeb2e74 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 6 Aug 2019 10:42:54 -0500 Subject: More work on DB mirroring. --- controller/PostgreSQL.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'controller/PostgreSQL.hpp') diff --git a/controller/PostgreSQL.hpp b/controller/PostgreSQL.hpp index ce6fb242..6b0ea996 100644 --- a/controller/PostgreSQL.hpp +++ b/controller/PostgreSQL.hpp @@ -55,7 +55,7 @@ public: virtual bool waitForReady(); virtual bool isReady(); - virtual void save(nlohmann::json &record); + virtual bool save(nlohmann::json &record,bool notifyListeners); virtual void eraseNetwork(const uint64_t networkId); virtual void eraseMember(const uint64_t networkId, const uint64_t memberId); virtual void nodeIsOnline(const uint64_t networkId, const uint64_t memberId, const InetAddress &physicalAddress); @@ -87,9 +87,12 @@ private: PGconn * getPgConn( OverrideMode m = ALLOW_PGBOUNCER_OVERRIDE ); + const Identity _myId; + const Address _myAddress; + std::string _myAddressStr; std::string _connString; - BlockingQueue _commitQueue; + BlockingQueue< std::pair > _commitQueue; std::thread _heartbeatThread; std::thread _membersDbWatcher; -- cgit v1.2.3