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

Method incrementStreamCount

libminifi/src/core/ContentRepository.cpp:55–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void ContentRepository::incrementStreamCount(const minifi::ResourceClaim &streamId) {
56 std::lock_guard<std::mutex> lock(count_map_mutex_);
57 const std::string str = streamId.getContentFullPath();
58 auto count = count_map_.find(str);
59 if (count != count_map_.end()) {
60 count_map_[str] = count->second + 1;
61 } else {
62 count_map_[str] = 1;
63 }
64}
65
66ContentRepository::StreamState ContentRepository::decrementStreamCount(const minifi::ResourceClaim &streamId) {
67 std::lock_guard<std::mutex> lock(count_map_mutex_);

Calls 3

getContentFullPathMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected