aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/reference/i_document_db_reference.h
blob: 52d38066909ba63605a490c13db30604b5651420 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include <vespa/vespalib/stllike/string.h>
#include <memory>

namespace search::attribute { class ReadableAttributeVector; }

namespace search {

class IGidToLidMapperFactory;
struct IDocumentMetaStoreContext;

}

namespace proton {

class GidToLidChangeRegistrator;

/*
 * Interface class for getting target attributes for imported
 * attributes, and for getting interface for mapping to lids
 * compatible with the target attributes.
 */
class IDocumentDBReference
{
public:
    using SP = std::shared_ptr<IDocumentDBReference>;
    virtual ~IDocumentDBReference() = default;
    virtual std::shared_ptr<search::attribute::ReadableAttributeVector> getAttribute(vespalib::stringref name) = 0;
    virtual std::shared_ptr<const search::IDocumentMetaStoreContext> getDocumentMetaStore() const = 0;
    virtual std::shared_ptr<search::IGidToLidMapperFactory> getGidToLidMapperFactory() = 0;
    virtual std::unique_ptr<GidToLidChangeRegistrator> makeGidToLidChangeRegistrator(const vespalib::string &docTypeName) = 0;
};

} // namespace proton