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
33  {
34  return _maxHistorySize;
35  }
36 } // namespace armarx::armem::server::wm::detail
armarx::armem::server::wm::detail
Definition: MaxHistorySize.cpp:5
armarx::armem::server::wm::detail::MaxHistorySize::_maxHistorySize
long _maxHistorySize
Maximum size of entity histories.
Definition: MaxHistorySize.h:27
MaxHistorySize.h
ARMARX_DEBUG
#define ARMARX_DEBUG
Definition: Logging.h:184
armarx::armem::server::wm::detail::MaxHistorySize::getMaxHistorySize
long getMaxHistorySize() const
Definition: MaxHistorySize.cpp:32
armarx::armem::server::wm::detail::MaxHistorySize::setMaxHistorySize
void setMaxHistorySize(long maxSize, const std::string &additionalInfo="")
Set the maximum number of snapshots to be contained in an entity.
Definition: MaxHistorySize.cpp:8
Logging.h