arpadboda commented on a change in pull request #718: MINIFICPP-1132 - CWEL
should stop committing further flowfiles in cas…
URL: https://github.com/apache/nifi-minifi-cpp/pull/718#discussion_r372503866
##########
File path: libminifi/src/core/ProcessSession.cpp
##########
@@ -965,6 +965,18 @@ std::shared_ptr<core::FlowFile> ProcessSession::get() {
return NULL;
}
+bool ProcessSession::outgoingConnectionsFull(const std::string& relationship) {
+ std::set<std::shared_ptr<Connectable>> connections =
process_context_->getProcessorNode()->getOutGoingConnections(relationship);
+ Connection * connection = nullptr;
+ for (const auto& conn : connections) {
+ connection = dynamic_cast<Connection*>(conn.get());
+ if (connection && connection->isFull()) {
+ return true;
+ }
+ }
+ return false;
Review comment:
I also like std algorithms, but it in this I don't think it makes the code
any more readable.
----------------------------------------------------------------
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]
With regards,
Apache Git Services