| 64 | } |
| 65 | |
| 66 | ContentRepository::StreamState ContentRepository::decrementStreamCount(const minifi::ResourceClaim &streamId) { |
| 67 | std::lock_guard<std::mutex> lock(count_map_mutex_); |
| 68 | const std::string str = streamId.getContentFullPath(); |
| 69 | auto count = count_map_.find(str); |
| 70 | if (count != count_map_.end() && count->second > 1) { |
| 71 | count_map_[str] = count->second - 1; |
| 72 | return StreamState::Alive; |
| 73 | } else { |
| 74 | count_map_.erase(str); |
| 75 | remove(streamId); |
| 76 | return StreamState::Deleted; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | } // namespace core |
| 81 | } // namespace minifi |
no test coverage detected