diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-07-19 14:13:17 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-07-19 14:13:17 -0700 |
| commit | b62296a40bd4ed2d01404679cdc9512a1f18bcca (patch) | |
| tree | 4a0d32583785537107351f162839bcf9b591c67c /controller/JSONDB.hpp | |
| parent | 31785f7f6ec27e826efc3cc2b45979e5d58f37bb (diff) | |
| download | infinitytier-b62296a40bd4ed2d01404679cdc9512a1f18bcca.tar.gz infinitytier-b62296a40bd4ed2d01404679cdc9512a1f18bcca.zip | |
Bug fixes in new harness mode.
Diffstat (limited to 'controller/JSONDB.hpp')
| -rw-r--r-- | controller/JSONDB.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/controller/JSONDB.hpp b/controller/JSONDB.hpp index 23d00a51..7131b0c1 100644 --- a/controller/JSONDB.hpp +++ b/controller/JSONDB.hpp @@ -62,6 +62,17 @@ public: JSONDB(const std::string &basePath); ~JSONDB(); + /** + * Write a JSON object to the data store + * + * It's important that obj contain a valid JSON object with no newlines (jsonDump with -1 + * for indentation), since newline-delimited JSON is what nodeJS's IPC speaks and this + * is important in Central-harnessed mode. + * + * @param n Path name of object + * @param obj Object in single-line no-CRs JSON object format (OSUtils::jsonDump(obj,-1)) + * @return True if write appears successful + */ bool writeRaw(const std::string &n,const std::string &obj); bool hasNetwork(const uint64_t networkId) const; @@ -171,6 +182,7 @@ private: std::unordered_map< uint64_t,_NW > _networks; std::unordered_map< uint64_t,std::unordered_set< uint64_t > > _members; + bool _dataReady; Mutex _networks_m; }; |
