blob: 4ea227f205b62a599c2f4cba4472dc8ce16c7296 (
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 Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <memory>
namespace search {
struct IDocumentMetaStore;
/**
* API for providing read interface to the document meta store.
*/
struct IDocumentMetaStoreContext {
/**
* Guard for access to the read interface.
* This guard should be alive as long as read interface is used.
*/
struct IReadGuard {
using SP = std::shared_ptr<IReadGuard>;
virtual ~IReadGuard() = default;
/**
* Access to read interface.
*/
virtual const search::IDocumentMetaStore &get() const = 0;
};
virtual ~IDocumentMetaStoreContext() = default;
/**
* Access to read interface.
* Should be used by all reader threads.
*/
virtual IReadGuard::SP getReadGuard() const = 0;
};
}
|