PersistentEntitySegment.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package MemoryX::Core
17 * @author Alexey Kozlov ( kozlov at kit dot edu)
18 * @date 2013
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
26 
27 #include <MemoryX/interface/core/MemoryInterface.h>
28 #include <MemoryX/interface/components/CommonStorageInterface.h>
29 
30 #include <mutex>
31 
32 namespace memoryx
33 {
34  class MongoSerializer;
36 
37  /**
38  \page MemoryX-HowTos-create-new-persisten-segment How to create a new persistent memory segment in MemoryX
39 
40  \li Create Ice interface for new segment in MemoryX/interface/memorytypes/MemorySegments.ice which inherits from memoryx::PersistentEntitySegmentBase
41  \code
42  ["cpp:virtual"]
43  class PersistentDataSegmentBase extends PersistentEntitySegmentBase
44  {
45  // add some special methods here
46  };
47  \endcode
48 
49  \li Create C++ header file
50  \code
51  #ifndef ARMARX_MEMORYX_NEW_DATA_SEGMENT_H
52  #define ARMARX_MEMORYX_NEW_DATA_SEGMENT_H
53 
54  #include "../entity/profiler/ProfilerTransition.h"
55 
56  #include <MemoryX/core/memory/PersistentEntitySegment.h>
57  #include <MemoryX/interface/memorytypes/MemorySegments.h>
58 
59  #include <ArmarXCore/core/system/ImportExportComponent.h>
60 
61  namespace memoryx
62  {
63  class ARMARXCOMPONENT_IMPORT_EXPORT PersistentDataSegment :
64  virtual public PersistentEntitySegment,
65  virtual public PersistentDataSegmentBase
66  {
67  public:
68  PersistentDataSegment(CollectionInterfacePrx entityCollection, Ice::CommunicatorPtr communicator, bool useMongoIds = true);
69 
70  // implementation of Ice interface methods
71  ["cpp:const"]
72  hasDataEntity(string name);
73  };
74 
75  using PersistentProfilerDataSegmentPtr = IceInternal::Handle<PersistentProfilerDataSegment>;
76  }
77 
78  #endif
79  \endcode
80 
81  \li Create C++ implementation file
82  \code
83  #include "PersistentDataSegment.h"
84 
85  using namespace memoryx;
86 
87  PersistentDataSegment::PersistentDataSegment(CollectionInterfacePrx entityCollection, Ice::CommunicatorPtr communicator, bool useMongoIds) :
88  PersistentEntitySegment(entityCollection, communicator, useMongoIds),
89  PersistentDataSegmentBase()
90  {
91  }
92 
93  // implementation of further methods
94  \endcode
95 
96  \li Add header and implementation files to the appropriate CMake target.
97 
98  \li Add/register new segment in memoryx::PriorKnowledge or memoryx::LongtermMemory and add accessor functions to the recpective memory interface.
99  \code
100  \endcode
101 
102  */
103 
104  /**
105  * @brief The PersistentEntitySegment class is the base class for all memory segments containing memoryx::Entity instances to be stored permanently in MongoDB.
106  */
108  public virtual PersistentEntitySegmentBase,
109  public virtual SegmentUtilImplementations
110  {
111  public:
112  PersistentEntitySegment(CollectionInterfacePrx entityCollection, Ice::CommunicatorPtr ic, bool useMongoIds = true);
113  ~PersistentEntitySegment() override;
114 
115  NameList getReadCollectionsNS(const ::Ice::Current& = Ice::emptyCurrent) const override;
116  void clearReadCollections(const ::Ice::Current& = Ice::emptyCurrent) override;
117  void addReadCollection(const CollectionInterfacePrx& coll, const ::Ice::Current& = Ice::emptyCurrent) override;
118  std::string getWriteCollectionNS(const ::Ice::Current& = Ice::emptyCurrent) const override;
119  void setWriteCollection(const CollectionInterfacePrx& coll, const ::Ice::Current& = Ice::emptyCurrent) override;
120  void setSingleRWCollection(const CollectionInterfacePrx& coll, const ::Ice::Current& = Ice::emptyCurrent) override;
121 
122  std::string getObjectTypeId(const ::Ice::Current& = Ice::emptyCurrent) const override;
123 
124  /**
125  * @brief addEntity add new \p entity and return the newly generated entity ID
126  * @param entity
127  * @return
128  */
129  std::string addEntity(const EntityBasePtr& entity, const ::Ice::Current& c = Ice::emptyCurrent) override;
130  virtual std::string addEntityThreadUnsafe(const EntityBasePtr& entity);
131  std::string upsertEntity(const std::string& entityId, const EntityBasePtr& entity, const ::Ice::Current& = Ice::emptyCurrent) override;
132  virtual std::string upsertEntityThreadUnsafe(const std::string& entityId, const EntityBasePtr& entity);
133  std::string upsertEntityByName(const std::string& entityName, const EntityBasePtr& entity, const ::Ice::Current& = Ice::emptyCurrent) override;
134  virtual std::string upsertEntityByNameThreadUnsafe(const std::string& entityName, const EntityBasePtr& entity);
135  /**
136  * @brief addEntityList adds all entities contained in \entityList to this segment and returns a list of created entity IDs
137  * @return list of generated entity IDs
138  */
139  EntityIdList addEntityList(const EntityBaseList& entityList, const Ice::Current& = Ice::emptyCurrent) override;
140  virtual EntityIdList addEntityListThreadUnsafe(const EntityBaseList& entityList);
141 
142  EntityIdList upsertEntityList(const EntityBaseList& entityList, const Ice::Current& = Ice::emptyCurrent) override;
143  virtual EntityIdList upsertEntityListThreadUnsafe(const EntityBaseList& entityList);
144 
145  void updateEntity(const ::std::string& entityId, const EntityBasePtr& update, const ::Ice::Current& = Ice::emptyCurrent) override;
146  virtual void updateEntityThreadUnsafe(const ::std::string& entityId, const EntityBasePtr& update);
147 
148  /**
149  * @brief removeEntity removes an entity with the ID \p entityId
150  * @param entityId
151  */
152  void removeEntity(const ::std::string& entityId, const ::Ice::Current& = Ice::emptyCurrent) override;
153  virtual void removeEntityThreadUnsafe(const ::std::string& entityId);
154  /**
155  * @brief removeAllEntities collects all entities managed by this memory segment and removes them from the segment
156  * @param c
157  */
158  void removeAllEntities(const ::Ice::Current& c = Ice::emptyCurrent) override;
159 
160  bool hasEntityById(const std::string& entityId, const Ice::Current& = Ice::emptyCurrent) const override;
161  bool hasEntityByIdThreadUnsafe(const std::string& entityId) const;
162  bool hasEntityByName(const std::string& entityName, const Ice::Current& = Ice::emptyCurrent) const override;
163  bool hasEntityByNameThreadUnsafe(const std::string& entityName) const;
164 
165  EntityBasePtr getEntityById(const ::std::string& entityId, const ::Ice::Current& = Ice::emptyCurrent) const override;
166  virtual EntityBasePtr getEntityByIdThreadUnsafe(const ::std::string& entityId) const;
167  EntityBasePtr getEntityByName(const ::std::string& name, const ::Ice::Current& = Ice::emptyCurrent) const override;
168  virtual EntityBasePtr getEntityByNameThreadUnsafe(const ::std::string& name) const;
169  EntityBaseList getEntitiesByAttrValue(const ::std::string& attrName, const ::std::string& attrValue, const ::Ice::Current& = Ice::emptyCurrent) const override;
170  EntityBaseList getEntitiesByAttrValueList(const ::std::string& attrName, const NameList& attrValueList, const ::Ice::Current& = Ice::emptyCurrent) const override;
171  EntityIdList getAllEntityIds(const ::Ice::Current& = Ice::emptyCurrent) const override;
172  virtual EntityIdList getAllEntityIdsThreadUnsafe() const;
173  /**
174  * @brief getAllEntities returns a list of all entities managed by this memory segment
175  * @return
176  */
177  EntityBaseList getAllEntities(const ::Ice::Current& = Ice::emptyCurrent) const override;
178  IdEntityMap getIdEntityMap(const ::Ice::Current& = Ice::emptyCurrent) const override;
179 
180  /**
181  * @brief size counts the number of memoryx::Entity instances contained available reachable throuhg memoryx::PersistentEntitySegment::readCollections.
182  * @return number of entities contained in this memory segment
183  */
184  Ice::Int size(const ::Ice::Current& = Ice::emptyCurrent) const override;
185  void print(const ::Ice::Current& = Ice::emptyCurrent) const override;
186  /**
187  * @brief clear removes all elements from the current memoryx::PersistentEntitySegment::writeCollection
188  */
189  void clear(const ::Ice::Current& = Ice::emptyCurrent) override;
190 
191  ::Ice::Identity getIceId(const ::Ice::Current& = Ice::emptyCurrent) const override;
192  std::string getSegmentName(const ::Ice::Current& = Ice::emptyCurrent) const override;
193 
194  // EntityMemorySegmentInterface interface
195  public:
196  EntityRefBasePtr getEntityRefById(const std::string& id, const Ice::Current&) const override;
197  EntityRefBasePtr getEntityRefByName(const std::string& name, const Ice::Current& c) const override;
198 
199  void setEntityAttribute(const std::string& entityId, const EntityAttributeBasePtr& attribute, const Ice::Current&) override;
200  void setEntityAttributes(const std::string& entityId, const EntityAttributeList& attributeMap, const Ice::Current&) override;
201 
202  // AbstractMemorySegment interface
203  public:
204  void setParentMemory(const MemoryInterfacePtr& memory, const Ice::Current&) override;
205 
206  // PersistentEntitySegmentBase interface
207  public:
208  /**
209  * @brief retrieves Entity Refs that match the query. The query
210  * should be a mongo query like: { "attrs.endNode.value.value.entityId": "54b2a43b43b5d3199e3cb5b3" }
211  * @param query
212  * @param c
213  * @return
214  */
215  EntityRefList findRefsByQuery(const std::string& query, const Ice::Current& c) override;
216 
217  protected:
218  // set segment name
219  void setSegmentName(const std::string& segmentName, const ::Ice::Current& = Ice::emptyCurrent) override;
220 
221  MemoryInterfacePtr parentMemory;
222 
223  CollectionPrxList readCollections;
224  // mutable boost::mutex readCollectionsMutex;
225 
226  CollectionInterfacePrx writeCollection;
228  mutable std::recursive_mutex dbSerializerMutex;
229 
231 
232  EntityBasePtr deserializeEntity(const DBStorableData& dbEntity) const;
233  std::string segmentName;
234 
235 
236  };
237 
238 
240 
241 }
242 
memoryx::PersistentEntitySegment::setSingleRWCollection
void setSingleRWCollection(const CollectionInterfacePrx &coll, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: PersistentEntitySegment.cpp:123
memoryx::PersistentEntitySegment::getReadCollectionsNS
NameList getReadCollectionsNS(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:53
memoryx::PersistentEntitySegment::getIdEntityMap
IdEntityMap getIdEntityMap(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:580
memoryx::PersistentEntitySegment::addEntityList
EntityIdList addEntityList(const EntityBaseList &entityList, const Ice::Current &=Ice::emptyCurrent) override
addEntityList adds all entities contained in \entityList to this segment and returns a list of create...
Definition: PersistentEntitySegment.cpp:221
memoryx::PersistentEntitySegment::findRefsByQuery
EntityRefList findRefsByQuery(const std::string &query, const Ice::Current &c) override
retrieves Entity Refs that match the query.
Definition: PersistentEntitySegment.cpp:702
cyberglove_with_calib_22dof.ic
ic
Definition: cyberglove_with_calib_22dof.py:22
memoryx::PersistentEntitySegment::setEntityAttributes
void setEntityAttributes(const std::string &entityId, const EntityAttributeList &attributeMap, const Ice::Current &) override
Definition: PersistentEntitySegment.cpp:674
memoryx::PersistentEntitySegment::updateEntity
void updateEntity(const ::std::string &entityId, const EntityBasePtr &update, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: PersistentEntitySegment.cpp:244
memoryx::PersistentEntitySegment::dbSerializerMutex
std::recursive_mutex dbSerializerMutex
Definition: PersistentEntitySegment.h:228
memoryx::PersistentEntitySegment::setWriteCollection
void setWriteCollection(const CollectionInterfacePrx &coll, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: PersistentEntitySegment.cpp:115
memoryx::PersistentEntitySegment::parentMemory
MemoryInterfacePtr parentMemory
Definition: PersistentEntitySegment.h:221
memoryx::PersistentEntitySegment::setParentMemory
void setParentMemory(const MemoryInterfacePtr &memory, const Ice::Current &) override
Definition: PersistentEntitySegment.cpp:697
memoryx::PersistentEntitySegment::updateEntityThreadUnsafe
virtual void updateEntityThreadUnsafe(const ::std::string &entityId, const EntityBasePtr &update)
Definition: PersistentEntitySegment.cpp:250
memoryx::PersistentEntitySegment::print
void print(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:507
memoryx::PersistentEntitySegment::addEntity
std::string addEntity(const EntityBasePtr &entity, const ::Ice::Current &c=Ice::emptyCurrent) override
addEntity add new entity and return the newly generated entity ID
Definition: PersistentEntitySegment.cpp:135
memoryx::PersistentEntitySegment::getEntityRefByName
EntityRefBasePtr getEntityRefByName(const std::string &name, const Ice::Current &c) const override
Definition: PersistentEntitySegment.cpp:633
memoryx::SegmentUtilImplementations
Definition: SegmentUtilImplementations.h:54
memoryx::PersistentEntitySegment::removeAllEntities
void removeAllEntities(const ::Ice::Current &c=Ice::emptyCurrent) override
removeAllEntities collects all entities managed by this memory segment and removes them from the segm...
Definition: PersistentEntitySegment.cpp:283
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
memoryx::PersistentEntitySegment::getObjectTypeId
std::string getObjectTypeId(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:130
memoryx::PersistentEntitySegment::removeEntityThreadUnsafe
virtual void removeEntityThreadUnsafe(const ::std::string &entityId)
Definition: PersistentEntitySegment.cpp:270
memoryx::PersistentEntitySegment::size
Ice::Int size(const ::Ice::Current &=Ice::emptyCurrent) const override
size counts the number of memoryx::Entity instances contained available reachable throuhg memoryx::Pe...
Definition: PersistentEntitySegment.cpp:489
memoryx::PersistentEntitySegment::getSegmentName
std::string getSegmentName(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:525
memoryx::PersistentEntitySegment::addEntityThreadUnsafe
virtual std::string addEntityThreadUnsafe(const EntityBasePtr &entity)
Definition: PersistentEntitySegment.cpp:142
memoryx::PersistentEntitySegment::setSegmentName
void setSegmentName(const std::string &segmentName, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: PersistentEntitySegment.cpp:741
memoryx::PersistentEntitySegment::getAllEntities
EntityBaseList getAllEntities(const ::Ice::Current &=Ice::emptyCurrent) const override
getAllEntities returns a list of all entities managed by this memory segment
Definition: PersistentEntitySegment.cpp:554
memoryx::PersistentEntitySegment::~PersistentEntitySegment
~PersistentEntitySegment() override
Definition: PersistentEntitySegment.cpp:49
memoryx::PersistentEntitySegment::getAllEntityIdsThreadUnsafe
virtual EntityIdList getAllEntityIdsThreadUnsafe() const
Definition: PersistentEntitySegment.cpp:536
memoryx::PersistentEntitySegment::writeCollection
CollectionInterfacePrx writeCollection
Definition: PersistentEntitySegment.h:226
IceInternal::Handle< ::Ice::Communicator >
memoryx::PersistentEntitySegment::upsertEntityByNameThreadUnsafe
virtual std::string upsertEntityByNameThreadUnsafe(const std::string &entityName, const EntityBasePtr &entity)
Definition: PersistentEntitySegment.cpp:205
memoryx::PersistentEntitySegment::PersistentEntitySegment
PersistentEntitySegment(CollectionInterfacePrx entityCollection, Ice::CommunicatorPtr ic, bool useMongoIds=true)
Definition: PersistentEntitySegment.cpp:41
memoryx::PersistentEntitySegment::getEntityByNameThreadUnsafe
virtual EntityBasePtr getEntityByNameThreadUnsafe(const ::std::string &name) const
Definition: PersistentEntitySegment.cpp:406
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
memoryx::PersistentEntitySegment::getEntityById
EntityBasePtr getEntityById(const ::std::string &entityId, const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:363
memoryx::PersistentEntitySegment::getEntityByName
EntityBasePtr getEntityByName(const ::std::string &name, const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:399
memoryx::PersistentEntitySegment::getEntityRefById
EntityRefBasePtr getEntityRefById(const std::string &id, const Ice::Current &) const override
Definition: PersistentEntitySegment.cpp:612
memoryx::PersistentEntitySegment::deserializeEntity
EntityBasePtr deserializeEntity(const DBStorableData &dbEntity) const
Definition: PersistentEntitySegment.cpp:592
SegmentUtilImplementations.h
memoryx::PersistentEntitySegment::upsertEntityListThreadUnsafe
virtual EntityIdList upsertEntityListThreadUnsafe(const EntityBaseList &entityList)
Definition: PersistentEntitySegment.cpp:179
memoryx::PersistentEntitySegment::addReadCollection
void addReadCollection(const CollectionInterfacePrx &coll, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: PersistentEntitySegment.cpp:78
memoryx::PersistentEntitySegment::getEntityByIdThreadUnsafe
virtual EntityBasePtr getEntityByIdThreadUnsafe(const ::std::string &entityId) const
Definition: PersistentEntitySegment.cpp:371
memoryx::PersistentEntitySegment::upsertEntity
std::string upsertEntity(const std::string &entityId, const EntityBasePtr &entity, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: PersistentEntitySegment.cpp:153
memoryx::PersistentEntitySegment::hasEntityByNameThreadUnsafe
bool hasEntityByNameThreadUnsafe(const std::string &entityName) const
Definition: PersistentEntitySegment.cpp:340
memoryx::PersistentEntitySegment::setEntityAttribute
void setEntityAttribute(const std::string &entityId, const EntityAttributeBasePtr &attribute, const Ice::Current &) override
Definition: PersistentEntitySegment.cpp:656
memoryx::PersistentEntitySegment::hasEntityByIdThreadUnsafe
bool hasEntityByIdThreadUnsafe(const std::string &entityId) const
Definition: PersistentEntitySegment.cpp:301
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:67
memoryx::PersistentEntitySegment::upsertEntityList
EntityIdList upsertEntityList(const EntityBaseList &entityList, const Ice::Current &=Ice::emptyCurrent) override
Definition: PersistentEntitySegment.cpp:173
memoryx::PersistentEntitySegment::getIceId
::Ice::Identity getIceId(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:518
memoryx::PersistentEntitySegment::addEntityListThreadUnsafe
virtual EntityIdList addEntityListThreadUnsafe(const EntityBaseList &entityList)
Definition: PersistentEntitySegment.cpp:227
memoryx::PersistentEntitySegment::getEntitiesByAttrValue
EntityBaseList getEntitiesByAttrValue(const ::std::string &attrName, const ::std::string &attrValue, const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:427
memoryx::PersistentEntitySegment::clear
void clear(const ::Ice::Current &=Ice::emptyCurrent) override
clear removes all elements from the current memoryx::PersistentEntitySegment::writeCollection
Definition: PersistentEntitySegment.cpp:513
memoryx::PersistentEntitySegment::useMongoIds
bool useMongoIds
Definition: PersistentEntitySegment.h:230
memoryx::PersistentEntitySegment::removeEntity
void removeEntity(const ::std::string &entityId, const ::Ice::Current &=Ice::emptyCurrent) override
removeEntity removes an entity with the ID entityId
Definition: PersistentEntitySegment.cpp:263
memoryx::PersistentEntitySegment::hasEntityByName
bool hasEntityByName(const std::string &entityName, const Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:334
memoryx::PersistentEntitySegment::upsertEntityByName
std::string upsertEntityByName(const std::string &entityName, const EntityBasePtr &entity, const ::Ice::Current &=Ice::emptyCurrent) override
Definition: PersistentEntitySegment.cpp:199
IceUtil::Handle< MongoSerializer >
memoryx::PersistentEntitySegment::clearReadCollections
void clearReadCollections(const ::Ice::Current &=Ice::emptyCurrent) override
Definition: PersistentEntitySegment.cpp:71
memoryx::PersistentEntitySegment
The PersistentEntitySegment class is the base class for all memory segments containing memoryx::Entit...
Definition: PersistentEntitySegment.h:107
memoryx::MongoSerializerPtr
IceUtil::Handle< MongoSerializer > MongoSerializerPtr
Definition: EntityRef.h:40
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:916
memoryx::PersistentEntitySegment::getAllEntityIds
EntityIdList getAllEntityIds(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:530
memoryx::PersistentEntitySegment::getEntitiesByAttrValueList
EntityBaseList getEntitiesByAttrValueList(const ::std::string &attrName, const NameList &attrValueList, const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:457
memoryx::PersistentEntitySegment::upsertEntityThreadUnsafe
virtual std::string upsertEntityThreadUnsafe(const std::string &entityId, const EntityBasePtr &entity)
Definition: PersistentEntitySegment.cpp:159
memoryx::PersistentEntitySegment::readCollections
CollectionPrxList readCollections
Definition: PersistentEntitySegment.h:223
memoryx::PersistentEntitySegment::dbSerializer
MongoSerializerPtr dbSerializer
Definition: PersistentEntitySegment.h:227
memoryx::PersistentEntitySegment::hasEntityById
bool hasEntityById(const std::string &entityId, const Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:295
memoryx::PersistentEntitySegment::segmentName
std::string segmentName
Definition: PersistentEntitySegment.h:233
memoryx::PersistentEntitySegment::getWriteCollectionNS
std::string getWriteCollectionNS(const ::Ice::Current &=Ice::emptyCurrent) const override
Definition: PersistentEntitySegment.cpp:110