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

Method isAutoTerminated

libminifi/src/core/Connectable.cpp:114–127  ·  view source on GitHub ↗

Check whether the relationship is auto terminated

Source from the content-addressed store, hash-verified

112
113// Check whether the relationship is auto terminated
114bool Connectable::isAutoTerminated(const core::Relationship &relationship) {
115 // if we are running we do not need a lock since the function to change relationships_ ( setSupportedRelationships)
116 // cannot be executed while we are running
117 const bool isConnectableRunning = isRunning();
118
119 const auto conditionalLock = isConnectableRunning ? std::unique_lock<std::mutex>() : std::unique_lock<std::mutex>(relationship_mutex_);
120
121 const auto &it = auto_terminated_relationships_.find(relationship.getName());
122 if (it != auto_terminated_relationships_.end()) {
123 return true;
124 } else {
125 return false;
126 }
127}
128
129void Connectable::waitForWork(uint64_t timeoutMs) {
130 has_work_.store(isWorkAvailable());

Callers 1

routeFlowFileMethod · 0.45

Calls 3

findMethod · 0.45
getNameMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected