| 134 | } |
| 135 | |
| 136 | void Connection::put(const std::shared_ptr<core::FlowFile>& flow) { |
| 137 | if (drop_empty_ && flow->getSize() == 0) { |
| 138 | logger_->log_info("Dropping empty flow file: %s", flow->getUUIDStr()); |
| 139 | return; |
| 140 | } |
| 141 | { |
| 142 | std::lock_guard<std::mutex> lock(mutex_); |
| 143 | |
| 144 | queue_.push(flow); |
| 145 | |
| 146 | queued_data_size_ += flow->getSize(); |
| 147 | |
| 148 | logger_->log_debug("Enqueue flow file UUID %s to connection %s", flow->getUUIDStr(), name_); |
| 149 | } |
| 150 | |
| 151 | // Notify receiving processor that work may be available |
| 152 | if (dest_connectable_) { |
| 153 | logger_->log_debug("Notifying %s that %s was inserted", dest_connectable_->getName(), flow->getUUIDStr()); |
| 154 | dest_connectable_->notifyWork(); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | void Connection::multiPut(std::vector<std::shared_ptr<core::FlowFile>>& flows) { |
| 159 | { |
no test coverage detected