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

Method connectProcessors

nanofi/src/cxx/Plan.cpp:296–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296std::shared_ptr<minifi::Connection> ExecutionPlan::connectProcessors(std::shared_ptr<core::Processor> src_proc, std::shared_ptr<core::Processor> dst_proc, core::Relationship relationship,
297 bool set_dst) {
298 std::stringstream connection_name;
299 connection_name << src_proc->getUUIDStr() << "-to-" << dst_proc->getUUIDStr();
300 std::shared_ptr<minifi::Connection> connection = std::make_shared<minifi::Connection>(flow_repo_, content_repo_, connection_name.str());
301 connection->addRelationship(relationship);
302
303 // link the connections so that we can test results at the end for this
304 connection->setSource(src_proc);
305
306 connection->setSourceUUID(src_proc->getUUID());
307 if (set_dst) {
308 connection->setDestination(dst_proc);
309 connection->setDestinationUUID(dst_proc->getUUID());
310 if (src_proc != dst_proc) {
311 dst_proc->addConnection(connection);
312 }
313 }
314 src_proc->addConnection(connection);
315
316 return connection;
317}
318
319bool ExecutionPlan::setFailureCallback(std::function<void(flow_file_record*)> onerror_callback) {
320 if (finalized && !failure_handler_) {

Callers

nothing calls this directly

Calls 8

addRelationshipMethod · 0.80
setSourceMethod · 0.80
setSourceUUIDMethod · 0.80
setDestinationMethod · 0.80
setDestinationUUIDMethod · 0.80
getUUIDStrMethod · 0.45
getUUIDMethod · 0.45
addConnectionMethod · 0.45

Tested by

no test coverage detected