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

Method decrementStreamCount

libminifi/src/core/ContentRepository.cpp:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66ContentRepository::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

Calls 4

getContentFullPathMethod · 0.45
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected