blob: decb03d97e0738ee7d36bc6f107948b2b8d1f11b (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/config/retriever/configsnapshot.h>
#include <vespa/vespalib/stllike/string.h>
namespace searchcorespi {
/**
* Class that keeps the config used when constructing an index manager.
*/
class IndexManagerConfig {
private:
vespalib::string _configId;
const config::ConfigSnapshot &_configSnapshot;
size_t _numSearcherThreads;
public:
IndexManagerConfig(const vespalib::string &configId,
const config::ConfigSnapshot &configSnapshot,
size_t numSearcherThreads);
~IndexManagerConfig();
/**
* Returns the config id used to retrieve the configs from the config snapshot instance.
*/
const vespalib::string &getConfigId() const { return _configId; }
/**
* Returns the snapshot containing configs to be used by the index manager.
*/
const config::ConfigSnapshot &getConfigSnapshot() const { return _configSnapshot; }
/**
* Returns the number of searcher threads that are used to query the index manager.
*/
size_t getNumSearcherThreads() const { return _numSearcherThreads; }
};
} // namespace searchcorespi
|