Go to the documentation of this file.
7 #include <SimoxUtility/json.h>
17 template <
class _CoreSegmentT>
33 std::lock_guard l(storeMutex);
61 buffer->id() =
id.getMemoryID();
75 task->setDelayWarningTolerance(
94 std::lock_guard l(bufferMutex);
101 std::lock_guard l(storeMutex);
103 std::lock_guard l(bufferMutex);
114 while (
storeFlag.test_and_set(std::memory_order_acquire))
116 std::this_thread::yield();
119 storeFlag.clear(std::memory_order_release);
126 if (json.find(
"BufferedMemory.storeFrequency") != json.end())
129 ARMARX_INFO <<
"Setting store frequency from configuration json to "
145 std::lock_guard l(bufferMutex);
155 std::unique_ptr<armem::wm::Memory>
buffer;
167 mutable std::recursive_mutex bufferMutex;
168 mutable std::recursive_mutex storeMutex;
void setMixinMemoryID(const MemoryID &id)
#define TIMING_START(name)
void directlyStore(const armem::server::wm::Memory &serverMemory)
std::unique_ptr< armem::wm::Memory > buffer
Internal memory for data consolidated from wm to ltm (double-buffer) The to-put-to-ltm buffer (contai...
std::atomic_flag storeFlag
armem::wm::Memory getBuffer() const
std::unique_ptr< armem::wm::Memory > to_store
#define ARMARX_CHECK_NOT_EMPTY(c)
virtual ~BufferedMemoryMixin()=default
Brief description of class memory.
#define TIMING_END_STREAM(name, os)
A memory storing data on the hard drive and in mongodb (needs 'armarx memory start' to start the mong...
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
void addToBuffer(const armem::wm::Memory &memory)
virtual void _directlyStore(const armem::wm::Memory &memory)=0
Client-side working memory.
BufferedMemoryMixin(const MemoryID &id)
void configureMixin(const nlohmann::json &json)
configuration
const std::string memoryName
void createPropertyDefinitions(PropertyDefinitionsPtr &defs, const std::string &prefix)
Commit toCommit(const ContainerT &container)
float storeFrequency
The frequency (Hz) to store data to the ltm.
void directlyStore(const armem::wm::Memory &memory)