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

Method stash

libminifi/src/core/ProcessSession.cpp:596–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596void ProcessSession::stash(const std::string &key, const std::shared_ptr<core::FlowFile> &flow) {
597 logger_->log_debug("Stashing content from %s to key %s", flow->getUUIDStr(), key);
598
599 auto claim = flow->getResourceClaim();
600 if (!claim) {
601 logger_->log_warn("Attempted to stash content of record %s when "
602 "there is no resource claim",
603 flow->getUUIDStr());
604 return;
605 }
606
607 // Stash the claim
608 flow->setStashClaim(key, claim);
609
610 // Clear current claim
611 flow->clearResourceClaim();
612}
613
614void ProcessSession::restore(const std::string &key, const std::shared_ptr<core::FlowFile> &flow) {
615 logger_->log_info("Restoring content to %s from key %s", flow->getUUIDStr(), key);

Callers 1

onTriggerMethod · 0.80

Calls 6

log_debugMethod · 0.80
getResourceClaimMethod · 0.80
log_warnMethod · 0.80
setStashClaimMethod · 0.80
clearResourceClaimMethod · 0.80
getUUIDStrMethod · 0.45

Tested by

no test coverage detected