blob: 2afd24149a27d648f9eaaf6193f7f0b9da46d18f (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/searchcommon/attribute/i_document_meta_store_context.h>
#include <vespa/searchlib/common/i_gid_to_lid_mapper.h>
namespace proton {
/*
* Class for mapping from gid to lid. Instances should be short lived
* due to read guards preventing resource reuse.
*/
class GidToLidMapper : public search::IGidToLidMapper
{
search::IDocumentMetaStoreContext::IReadGuard::SP _guard;
public:
GidToLidMapper(const search::IDocumentMetaStoreContext &dmsContext);
~GidToLidMapper() override;
void foreach(const search::IGidToLidMapperVisitor &visitor) const override;
};
} // namespace proton
|