| 594 | } |
| 595 | |
| 596 | void 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 | |
| 614 | void 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); |
no test coverage detected