5 #include <SimoxUtility/json.h>
19 namespace bsoncxxbuilder = bsoncxx::builder::stream;
20 namespace bsoncxxdoc = bsoncxx::document;
23 Memory::checkConnection()
const
29 <<
"The connection to mongocxx for ltm '" << cache.name()
31 <<
"\nTo start it, run e.g.: \n"
32 <<
"armarx memory start"
38 auto client = pool.acquire();
49 auto client = checkConnection();
55 std::lock_guard l(ltm_mutex);
56 auto databases = client->list_databases();
58 ss <<
"Found Memory-Collection in MongoDB for '" + cache.name() +
"': \n";
59 for (
const auto& doc : databases)
61 auto el = doc[
"name"];
62 ss <<
"\t - " << el.get_utf8().value <<
"\n";
80 auto client = checkConnection();
86 std::lock_guard l(ltm_mutex);
99 auto client = checkConnection();
105 std::lock_guard l(ltm_mutex);
113 moveCacheToLUTAndClearCache();