ValueType Get()

in src/outmdsd/ConcurrentMap.h [133:144]


    ValueType Get(const std::string & key)
    {
        if (key.empty()) {
            throw std::invalid_argument("Invalid empty string for map key.");
        }
        std::lock_guard<std::mutex> lk(m_cacheMutex);
        auto item = m_cache.find(key);
        if (item == m_cache.end()) {
            throw std::out_of_range("ConcurrentMap::Get(): key not found " + key);
        }
        return item->second;
    }