adamdebreceni commented on a change in pull request #932:
URL: https://github.com/apache/nifi-minifi-cpp/pull/932#discussion_r513329222
##########
File path: libminifi/include/core/CoreComponentState.h
##########
@@ -48,13 +49,13 @@ class CoreComponentStateManagerProvider {
public:
virtual ~CoreComponentStateManagerProvider() = default;
- virtual std::shared_ptr<CoreComponentStateManager>
getCoreComponentStateManager(const std::string& uuid) = 0;
+ virtual std::shared_ptr<CoreComponentStateManager>
getCoreComponentStateManager(const utils::Identifier& uuid) = 0;
virtual std::shared_ptr<CoreComponentStateManager>
getCoreComponentStateManager(const CoreComponent& component) {
- return getCoreComponentStateManager(component.getUUIDStr());
+ return getCoreComponentStateManager(component.getUUID());
}
- virtual std::unordered_map<std::string, std::unordered_map<std::string,
std::string>> getAllCoreComponentStates() = 0;
+ virtual std::map<utils::Identifier, std::unordered_map<std::string,
std::string>> getAllCoreComponentStates() = 0;
Review comment:
since it manages CoreComponents (it's in the name) and each
CoreComponent has an id, it makes sense to use the id directly instead of
`std::string`, if you are asking about the `unordered_map` => `map` change, I
tried to avoid writing a hash implementation for the `Identifier` (which we
then would have to manually specify each time we write the unordered_map type)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]