MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / updateProperty

Method updateProperty

libminifi/src/core/ConfigurableComponent.cpp:101–117  ·  view source on GitHub ↗

* Sets the property using the provided name * @param property name * @param value property value. * @return result of setting property. */

Source from the content-addressed store, hash-verified

99 * @return result of setting property.
100 */
101bool ConfigurableComponent::updateProperty(const std::string &name, const std::string &value) {
102 std::lock_guard<std::mutex> lock(configuration_mutex_);
103 auto &&it = properties_.find(name);
104
105 if (it != properties_.end()) {
106 Property orig_property = it->second;
107 Property& new_property = it->second;
108 auto onExit = gsl::finally([&] {
109 onPropertyModified(orig_property, new_property);
110 logger_->log_debug("Component %s property name %s value %s", name, new_property.getName(), value);
111 });
112 new_property.addValue(value);
113 return true;
114 } else {
115 return false;
116 }
117}
118
119/**
120 * Sets the property using the provided name

Callers 2

Calls 5

log_debugMethod · 0.80
addValueMethod · 0.80
findMethod · 0.45
endMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected