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

Method pickIncomingConnection

libminifi/src/core/Processor.cpp:384–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384std::shared_ptr<Connectable> Processor::pickIncomingConnection() {
385 std::lock_guard<std::mutex> rel_guard(relationship_mutex_);
386
387 auto beginIt = incoming_connections_Iter;
388 std::shared_ptr<Connectable> inConn;
389 do {
390 inConn = getNextIncomingConnectionImpl(rel_guard);
391 auto connection = std::dynamic_pointer_cast<Connection>(inConn);
392 if (!connection) {
393 continue;
394 }
395 if (partOfCycle(connection) && connection->isFull()) {
396 return inConn;
397 }
398 } while (incoming_connections_Iter != beginIt);
399
400 // we did not find a preferred connection
401 return getNextIncomingConnectionImpl(rel_guard);
402}
403
404} // namespace core
405} // namespace minifi

Callers 1

getMethod · 0.45

Calls 1

isFullMethod · 0.45

Tested by

no test coverage detected