blob: 244329f5b6b7e5158b9ae4c2b83519989535001e (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "i_document_db_reference.h"
namespace search { struct IDocumentMetaStoreContext; }
namespace proton {
struct IAttributeManager;
class IGidToLidChangeHandler;
/*
* Class for getting target attributes for imported
* attributes, and for getting interface for mapping to lids
* compatible with the target attributes.
*/
class DocumentDBReference : public IDocumentDBReference
{
std::shared_ptr<IAttributeManager> _attrMgr;
std::shared_ptr<const search::IDocumentMetaStoreContext> _dmsContext;
std::shared_ptr<IGidToLidChangeHandler> _gidToLidChangeHandler;
public:
DocumentDBReference(std::shared_ptr<IAttributeManager> attrMgr,
std::shared_ptr<const search::IDocumentMetaStoreContext> dmsContext,
std::shared_ptr<IGidToLidChangeHandler> gidToLidChangeHandler);
virtual ~DocumentDBReference();
virtual std::shared_ptr<search::attribute::ReadableAttributeVector> getAttribute(vespalib::stringref name) override;
virtual std::shared_ptr<const search::IDocumentMetaStoreContext> getDocumentMetaStore() const override;
virtual std::shared_ptr<search::IGidToLidMapperFactory> getGidToLidMapperFactory() override;
virtual std::unique_ptr<GidToLidChangeRegistrator> makeGidToLidChangeRegistrator(const vespalib::string &docTypeName) override;
};
} // namespace proton
|