blob: 1cfaab0f9c74f485ce40c3f67d2a5ea73f1f0ce9 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/searchcore/proton/common/doctypename.h>
#include <map>
#include <memory>
namespace proton {
class BootstrapConfig;
class DocumentDBConfig;
/*
* Class representing a config snapshot accross all document dbs as well as
* the matching bootstrap config.
*/
class ProtonConfigSnapshot
{
using DocumentDBConfigs = std::map<DocTypeName, std::shared_ptr<DocumentDBConfig>>;
std::shared_ptr<BootstrapConfig> _bootstrapConfig;
DocumentDBConfigs _documentDBConfigs;
public:
ProtonConfigSnapshot(std::shared_ptr<BootstrapConfig> bootstrapConfig,
DocumentDBConfigs documentDBConfigs);
~ProtonConfigSnapshot();
const std::shared_ptr<BootstrapConfig> getBootstrapConfig() const { return _bootstrapConfig; }
const DocumentDBConfigs &getDocumentDBConfigs() const { return _documentDBConfigs; }
};
} // namespace proton
|