MaxHistorySize.cpp
Go to the documentation of this file.
1#include "MaxHistorySize.h"
2
4
6{
7 void
8 MaxHistorySize::setMaxHistorySize(long maxSize, const std::string& additionalInfo)
9 {
10 if (maxSize < 0)
11 {
12 if (additionalInfo == "")
13 {
15 << "The maxHistorySize for this memory entity is set to < 0. "
16 << "This means nothing will ever be forgotten in working memory. "
17 << "This may slow down the memory server. \n"
18 << "It is better to set the maxHistorySize per Provider- or CoreSegment";
19 }
20 else
21 {
22 ARMARX_DEBUG << "The maxHistorySize for this memory entity is set to < 0. "
23 << "This means nothing will ever be forgotten in working memory. "
24 << "This may slow down the memory server."
25 << "The entity name is " << additionalInfo;
26 }
27 }
28 this->_maxHistorySize = maxSize;
29 }
30
31 long
36
37 void
42
43 size_t
48
49 void
51 {
52 _truncateMaxBatchSize = batchSize;
53 }
54
55 size_t
60} // namespace armarx::armem::server::wm::detail
long _maxHistorySize
Maximum size of entity histories.
size_t _truncateMaxBatchSize
Maximum number of snapshots to remove per truncate() call.
size_t _unlimitedHistoryWarningThreshold
Threshold for warning about unlimited history growth.
void setTruncateMaxBatchSize(size_t batchSize)
Set the maximum number of snapshots to remove per truncate() call.
void setUnlimitedHistoryWarningThreshold(size_t threshold)
Set the threshold for warning about unlimited history growth.
void setMaxHistorySize(long maxSize, const std::string &additionalInfo="")
Set the maximum number of snapshots to be contained in an entity.
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
Definition Logging.h:184