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

Method removeConnection

libminifi/src/core/ProcessGroup.cpp:363–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363void ProcessGroup::removeConnection(const std::shared_ptr<Connection>& connection) {
364 std::lock_guard<std::recursive_mutex> lock(mutex_);
365
366 if (connections_.find(connection) != connections_.end()) {
367 // We do not have the same connection in this process group yet
368 connections_.erase(connection);
369 logger_->log_debug("Remove connection %s into process group %s", connection->getName(), name_);
370 std::shared_ptr<Processor> source = this->findProcessorById(connection->getSourceUUID());
371 if (source)
372 source->removeConnection(connection);
373 std::shared_ptr<Processor> destination = this->findProcessorById(connection->getDestinationUUID());
374 if (destination && destination != source)
375 destination->removeConnection(connection);
376 }
377}
378
379void ProcessGroup::drainConnections() {
380 for (auto&& connection : connections_) {

Callers

nothing calls this directly

Calls 8

findProcessorByIdMethod · 0.95
log_debugMethod · 0.80
getSourceUUIDMethod · 0.80
getDestinationUUIDMethod · 0.80
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected