adam-markovics commented on a change in pull request #1107:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1107#discussion_r746478931
##########
File path:
libminifi/include/controllers/keyvalue/AbstractCoreComponentStateManagerProvider.h
##########
@@ -34,29 +34,39 @@ namespace controllers {
class AbstractCoreComponentStateManagerProvider : public
std::enable_shared_from_this<AbstractCoreComponentStateManagerProvider>,
public
core::CoreComponentStateManagerProvider {
public:
- ~AbstractCoreComponentStateManagerProvider() override;
-
std::shared_ptr<core::CoreComponentStateManager>
getCoreComponentStateManager(const utils::Identifier& uuid) override;
-
std::map<utils::Identifier, std::unordered_map<std::string, std::string>>
getAllCoreComponentStates() override;
class AbstractCoreComponentStateManager : public
core::CoreComponentStateManager{
public:
AbstractCoreComponentStateManager(std::shared_ptr<AbstractCoreComponentStateManagerProvider>
provider, const utils::Identifier& id);
- bool set(const core::CoreComponentState& kvs) override;
+ ~AbstractCoreComponentStateManager() override;
+ bool set(const core::CoreComponentState& kvs) override;
bool get(core::CoreComponentState& kvs) override;
-
bool clear() override;
-
bool persist() override;
+ bool isTransactionInProgress() const override;
+ bool beginTransaction() override;
+ bool commit() override;
+ bool rollback() override;
+
private:
+ enum class ChangeType {
+ NONE,
+ SET,
+ CLEAR
+ };
+
std::shared_ptr<AbstractCoreComponentStateManagerProvider> provider_;
utils::Identifier id_;
bool state_valid_;
core::CoreComponentState state_;
+ bool transactionInProgress_;
+ ChangeType changeType_;
+ core::CoreComponentState stateToSet_;
Review comment:
Done.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]