aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_map.cpp
blob: 9f545295357fe672f0a4d6bbeffa5d0e341bf83b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "tls_stats_map.h"
#include <vespa/vespalib/stllike/hash_map.hpp>
#include <vespa/log/log.h>
LOG_SETUP(".proton.flushengine.tls_stats_map");

namespace proton::flushengine {

TlsStatsMap::TlsStatsMap(Map &&map)
    : _map(std::move(map))
{ }

TlsStatsMap::~TlsStatsMap() { }

const TlsStats &
TlsStatsMap::getTlsStats(const vespalib::string &domain) const {
    auto itr = _map.find(domain);
    if (itr != _map.end()) {
        return itr->second;
    }
    LOG_ABORT("should not be reached");
}

}

VESPALIB_HASH_MAP_INSTANTIATE(vespalib::string, proton::flushengine::TlsStats);