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

Method onTrigger

libminifi/src/RemoteProcessorGroupPort.cpp:246–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void RemoteProcessorGroupPort::onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) {
247 logger_->log_trace("On trigger %s", getUUIDStr());
248 if (!transmitting_) {
249 return;
250 }
251
252 RPGLatch count;
253
254 std::string value;
255
256 logger_->log_trace("On trigger %s", getUUIDStr());
257
258 std::unique_ptr<sitetosite::SiteToSiteClient> protocol_ = nullptr;
259 try {
260 logger_->log_trace("get protocol in on trigger");
261 protocol_ = getNextProtocol();
262
263 if (!protocol_) {
264 logger_->log_info("no protocol, yielding");
265 context->yield();
266 return;
267 }
268
269 if (!protocol_->transfer(direction_, context, session)) {
270 logger_->log_warn("protocol transmission failed, yielding");
271 context->yield();
272 }
273
274 returnProtocol(std::move(protocol_));
275 return;
276 } catch (const minifi::Exception &) {
277 context->yield();
278 session->rollback();
279 } catch (...) {
280 context->yield();
281 session->rollback();
282 }
283}
284
285std::pair<std::string, int> RemoteProcessorGroupPort::refreshRemoteSite2SiteInfo() {
286 if (nifi_instances_.empty())

Callers

nothing calls this directly

Calls 7

getUUIDStrFunction · 0.85
log_traceMethod · 0.80
log_infoMethod · 0.80
log_warnMethod · 0.80
yieldMethod · 0.45
transferMethod · 0.45
rollbackMethod · 0.45

Tested by

no test coverage detected